I need to deploy a war file during integration tests where a service requires a property in a JNDI lookup. It is a plain String. I looked through the only existing example code at http://docs.codehaus.org/display/CARGO/Starting+and+stopping+a+container#Startingandstoppingacontainer-resources (end of page) how to add resources. I haven't found a way to do this with a simple String object.
To look it up in java:comp/env/myProperty, I set it like this:
cargo.resource.name=env/myProperty|
cargo.resource.type=java.lang.String|
cargo.resource.class=java.lang.String|
cargo.resource.parameters=theStringValue
But that seemed to return just a plain null. So how is this done properly?