Announcement Announcement Module
Collapse
No announcement yet.
Moving thread : ContextSingletonBeanFactoryLocator refresh issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

    Thank you.
    Last edited by gavieritei; Feb 21st, 2007, 08:23 AM.

  • #2
    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,
    Andreas

    Comment


    • #3
      Originally posted by Andreas Senft View Post
      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,
      Andreas

      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.


      Daniel

      Comment

      Working...
      X