views:

271

answers:

0

Hi,

I have an EJB deployed on my GlassFish v2.1 application server. I have also set up a lifecycle module within GlassFish which utilises this bean when it receives a READY_EVENT type. I have the following code to look up the bean:

BusinessInterface bean = (BusinessInterface) initialContext.lookup("JNDI lookup name");

...

// do something with bean

This works fine until I make a change to the EJB and redeploy it on the server using Eclipse 3.2. When I restart the server (which in turn, starts up my lifecycle module), the code throws a javax.naming.NameNotFoundException on the line listed above. i.e. the server can no longer find my bean using the JNDI lookup name that worked previously.

I understand there may be limited knowledge about this but if anyone can help, it would be much appreciated.

Thanks,

James