In maven cargo, how do I specify a String resource for jndy?

179 views Asked by At

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?

0

There are 0 answers