You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Tuukka Mustonen <tu...@gmail.com> on 2011/02/24 08:19:07 UTC
JNDI java: -prefix
Hi,
I am trying to setup JNDI "path" format using openejb.jndiname.format
-property:
properties.setProperty("openejb.jndiname.format",
"comp/env/{interfaceClass.simpleName}");
With this I can succesfully query for example:
new InitialContext().lookup("comp/env/SomeInterfaceRemoteHome");
However, I am trying to apply OpenEJB into an existing project, which uses
"java:comp/env/SomeInterfaceRemoteHome" form to get the objects. I tried
adding the "java:" prefix as in:
properties.setProperty("openejb.jndiname.format",
"java:comp/env/{interfaceClass.simpleName}");
But querying:
new InitialContext().lookup("java:comp/env/SomeInterfaceRemoteHome");
Just throws me: javax.naming.NameNotFoundException: Name
"comp/env/SomeInterfaceRemoteHome" not found.
Any pointers how I could make the java:comp/env/... lookups functional?
Tuukka