EJB and Context
1 posts in topic
Flat View  Flat View

Posted By:   Don_Hill
Posted On:   Monday, January 13, 2003 07:24 PM

When I do a Context ctx = InitialContext() and then
the lookup narrowed to the HomeInterface I am wondering once I have a Home and I do a ctx.close() do I loose the connection with the server, should the context be kept as a member as long as I need to make calls on a Stateful bean.

I have a stateful bean that I use in a thread, the thread is a task that could run every 15 min or every hr, currently we have a stayalive() method, we are trying to use the Handle approach for this, any suggestions would be helpful.


Re: EJB and Context

Posted By:   Nick_Maiorano  
Posted On:   Tuesday, January 14, 2003 05:09 AM


You can do a ctx.close() after you've obtained the home reference. The initialContext is just a reference to JNDI and is independant of your home object.

About | Sitemap | Contact