4 Replies Latest reply on Oct 27, 2003 4:16 AM by setya

    How to clean EJB instance left overs?

    setya

      Hi all,

      I need to clean orphaned EJB instance on the server caused by client application quiting unexpectedly due to errors.

      Is it possible to do this without restarting JBoss ?
      Is it possible to reconnect to the orphaned EJB instance ?

      Setya

        • 1. Re: How to clean EJB instance left overs?

          > I need to clean orphaned EJB instance on the server
          > caused by client application quiting unexpectedly due
          > to errors.

          I assume you mean stateful session bean.


          > Is it possible to do this without restarting JBoss ?

          The container will eventually time out the session and move it onto the disk. It will be eventually cleaned from the disk also. This is part of your <container-configuration> either in standardjboss.xml or jboss.xml.

          > Is it possible to reconnect to the orphaned EJB
          > instance ?

          You can store a handle to it on the client.

          -- Juha

          • 2. Re: How to clean EJB instance left overs?
            setya

            Thanks for the reply,

            > I assume you mean stateful session bean.

            Yes, indeed.

            > The container will eventually time out the session
            > and move it onto the disk. It will be eventually
            > cleaned from the disk also. This is part of your
            > <container-configuration> either in standardjboss.xml
            > or jboss.xml.

            So, I don't have to worry about orphaned EJB instance eating up server memory because it will be cleaned by container automatically?

            > You can store a handle to it on the client.
            How to do this ?

            Setya

            • 3. Re: How to clean EJB instance left overs?

              The sessions are first passivated to disk (default 10 mins)
              then removed (default 30 mins) when they are not used.

              To get the handle
              javax.ejb.EJBObject.getHandle()

              Regards,
              Adrian

              • 4. Re: How to clean EJB instance left overs?
                setya

                Thanks


                Setya