Olivier HEDIN wrote:
>
> 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 :
> 1) Creation of an ejbobj = new JOnASJMeterTestRemote,
> 2) Attach it to a JOnASJMeterTestBean that comes from the pool of free
> instances
> 3) Call of the method "putEJBObject(ejbobj)" inherited from JEntityHome
> 4) return the ejbobj it to the client side.
>
> The points 1, 2 and 4 seems OK, but what about the putEJBObject ?
> When are the ejbobjs removed from this apparent storage facility ?
> It might be responsible that 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 there something particular to do on client side ?
>
> Thanks for your answer.
> Olivier HEDIN
>
Hi,
we have taken your JMeterClientTest and measured the number of instances
created
and unreleased after a loop of doCreateTest method.
This method does:
JMeterTest jMeterTest = null;
userTransaction.begin();
jMeterTest = jMeterTestHome.create(id, body); // Entity Bean CMP
userTransaction.commit();
jMeterTest=null;
With the JOnAS 2-2-2 under Jeremie there were a lot of instances
relative
to the transaction manager (org.obwectweb.jonas_tm.PropagationContext,
org.obwectweb.jonas_tm.SubCoordinator_Stub etc...)
and other relative to the entity beans created
(JONASJMeterTestBeanRemote_Skel,
JONASJMeterTestBean..) that wasn't released.
We have integrated a new version of Jonathan that provides the unexport
features
for the distributed object and we use this feature to release these
instances.
Note that you have to remove explicitly the EJB you don't use anymore:
JMeterTest jMeterTest = null;
userTransaction.begin();
jMeterTest = jMeterTestHome.create(id, body); // Entity Bean CMP
userTransaction.commit();
jMeterTest.remove();
This version JOnAS 2-2-3 is under tests and will be available tomorrow
under CVS.
Best regards,
--
Philippe
Philippe Coq Evidian Phone: (33) 04 76 29 78 49
Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
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".