Philippe Durieux wrote:

> Olivier HEDIN wrote:
> >
> > Hi,
> >
> > We are currently experimenting the following problem with JOnAS 2.1.1 :
> >
> > We are creating lots of CMP Beans (about 20.000) of the same type.
> > The memory grows and grows until an OutOfMemoryError or something like
> > "Transaction inconsistency error" occurs.
> > When we run the EJBServer with -Xrunhprof, the HPJMeter shows that the
> > "JOnASMyBeanRemote_Stub", "JOnASMyBeanRemote", "JOnASMyBeanRemote_Skel"
> > and the "MyBeanPK" that are created are never removed from the memory.
> > The other objects "JOnASMyBeanHome", "JOnASMyBeanHome_Stub",
> > "JOnASMyBeanHome_Skel", "JOnASMyBean" are only instancied once and
> > that's ok with them.
> >
> > Is there a problem with JOnAS or with GC ?
> >
> > Transaction attribute is "Mandatory".
> >
> This is not normal if your orb is rmi, because the garbage collector
> should remove the Remote objects. All is normal if your orb is Jeremie
> because the garbage collector is not distributed.
> You can try to run the garbage collector in the server (JonasAdmin -gc)
> to see if the objects are removed then.
> --
> Philippe Durieux  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Bull - 1 rue de Provence - 38432 Echirolles Cedex France
> [EMAIL PROTECTED]
> -> Download our EJBServer at http://www.evidian.com/ejb <-

We continued our tests. The first one shows that there seems to be no direct
problem with the garbage collector (client side, EJBServer site and
rmiregistry side). The JVM option -verbose:gc shows that the gc has time to
make his job.

So we take a look at GenIC generated code. The behaviour of the
JOnASJMeterTestHome is clear an ok for us : it creates a ejbobj = new
JOnASJMeterTestRemote, attach to it a JOnASJMeterTestBean that comes from
the pool of free instances and returns it to the client side.
At this time RMI mechanisms are calling
UnicastRemoteObject.exportObject(ejbobj).
The problem is for us that this object is never unexported
(UnicastRemoteObject.unexportObject(ejbobj)) even if the client side
derefences the remote objects.
So after 10.000, 20.000, 50.000 or more depending of the amount of memory
available for EJBServer the memory if full of JOnASJMeterTestRemote,
JOnASJMeterTestRemote_Stub and JOnASJMeterTestRemote_Skel and crashes.

Is this analyse correct ?
Is this a bug of JOnAS, is it dependant of RMI mechanisms ?
Is there something particular to do on client side ?

Thanks for your answer.
Olivier HEDIN

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to