Feb 21st, 2007, 08:19 AM
Moving thread : ContextSingletonBeanFactoryLocator refresh issue
Starting from this thread,
ContextSingletonBeanFactoryLocator refresh issue, i got the suggestion of moving the thread.
Since I don't know how to actually move it (since i'm not admin or etc), I bring this to everybody's attention.
so, to sum the posts there:
I have a rich client application using ejb's.
when the client is inactive for some time, the context is closed.
I've tracked that to the release method of the BeanfactoryReference returned by the SingletonBeanFactoryLocator.useBeanFactory method.
So, how can I make the context remain "alive" during container lifecycle?
Last edited by gavieritei; Feb 21st, 2007 at 08:23 AM.
Feb 22nd, 2007, 03:41 AM
Maybe the pool containing your EJBs gets emptied once in a while. When the last reference to the app-context gets released, the context itself will be destroyed.
Perhaps you could check your deployment descriptor and ensure that the minimum size of the EJB pool is not zero. That should effectively prevent the last EJB from being removed (except on server shutdown).
Hope that helps,
Feb 22nd, 2007, 04:42 AM
Originally Posted by Andreas Senft
Thank you Andreas.
That was it.
For other people searching for an answer, i'm using oc4j + spring + ejb's you have in your orion-ejb-jar.xml the option of setting min-instances="x" or pool-cache-timeout="y".
The first keeps X ejb's opened, and the other sets the timeout to Y, after which the ejbRemove is called by the container. In spring context, that results in the context beeing closed, if min-instances is set to 0.