Results 1 to 3 of 3

Thread: Moving thread : ContextSingletonBeanFactoryLocator refresh issue

  1. #1
    Join Date
    Dec 2006
    Location
    Bucharest, Romania
    Posts
    14

    Default 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 at 08:23 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    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

  3. #3
    Join Date
    Dec 2006
    Location
    Bucharest, Romania
    Posts
    14

    Default

    Quote 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •