openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuukka Mustonen <tuukka.musto...@gmail.com>
Subject JNDI java: -prefix
Date Thu, 24 Feb 2011 07:19:07 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message