users@glassfish.java.net

glassfish-embedded non-portable jndi

From: <forums_at_java.net>
Date: Tue, 7 Jun 2011 09:03:24 -0500 (CDT)

 Hi all.

I wonder if anyone can help me with understanding how i could change portable
jndi names.

The problem is simple - I try to create tests for existing enterprise
application. This application is placed on the IBM application server 7.
Inside the app the JNDI lookup looks
like  jndi.lookup('ejblocal:SomeBeanName')

I have created Junit tests with glassfish-embedded
using EJBContainer.createEJBContainer. All EJBs deployed sucsessful, but if
you want to retrieve beans from jndi you should use the "portable" jndi names
like  java:global/bla/bla/bla. 

The problem is that there ara some methods in which we use jndi.lookup
instead of injection. It's impossible to test this methods. 

How can I change default jndi names in the glassfish-embedded.

I have tried to create config in ejb-jar.xml, but no effects.

 

 


--
[Message sent by forum member 'svsanek']
View Post: http://forums.java.net/node/809993