Hi, Yes I am doing jndi lookup in setEntityContext() This push the problem right into my face because I was not caching the home interfaces. I turn this into a bug, Bill responded already. https://sourceforge.net/tracker/?func=detail&aid=488940&group_id=22866&a tid=376687
I will abuse and go a bit further with something different, I looked at JNP code and NamingContext.java When no ejb-link exist (The calling and caller are each in one ejb jar, each ejb jar in its own ear), the JNDI create a MarshalledObject on the home interface and store it in the jndi map. The unmarshalling is done on jndi lookup. This is very expensive (40 msec). I have no idea if this is a normal timing or not but it kills performance also. I tried to remove that and store the home object directly (it is a $Proxy object), ... , but the classloaders are different so the classes does not look the same at lookup time and I receive a ClassCastException when casting my home interface. The parent classloaders of the two is a common one : javax.management.loading.MLet Is there any means to avoid that ? Jboss 3.0 ? I guess having only one ear or use the Dumbo stuff could help, I still have to work on/understand that... I migrate a lot of calls to use local interfaces, then see it runs faster and I only understand why today :) With Optimized turn on, we can not say that no serialization occurs : the jndi lookup one kills a lot. At this time I was not caching home interfaces, and the performance difference was easily visible. I don't see this as a high priority but if one do some performance tests on Jboss, he should be aware of this. Regards, Vincent. > FROM: Scott M Stark > DATE: 12/04/2001 09:51:39SUBJECT: > RE: [JBoss-dev] setEntityContext called at pool push time (because of reclaim usage in EntityInstancePool) > > Describe the performance your seeing in more detail as I can't gather > the details from your previous mails. Is it because you are doing > work in setEntityContext? > -----Original Message----- > From: Vincent Harcq [mailto:[EMAIL PROTECTED]] > Sent: mardi 4 d�cembre 2001 7:19 > To: [EMAIL PROTECTED]; 'Development JBoss' > Subject: RE: [JBoss-dev] setEntityContext called at pool push > time (because of reclaim usage in EntityInstancePool) > > > This was wrong also :( > The cache avoids my rerun of setEntityContext. OK. > But the cache only works for remote methods, not for home > methods Whenever I call a home method a new instance of the > entity is created, that is the overhead I have. I could solve > that by pushing back the context to the pool in > EntityInstanceInterceptor.invokeHome but I don't understand > the reason for the reclaim flag (it is false for home > methods, then AbstractInstancePool discard and recreate a new > instance which is the same as not putting the context to the > pool) Should I test the ID inside the context and if null > then do like reclaim ? I could not see a erason why this > should not be done for instances that have been created for > home methods calling and that have so no real data in them. > This works fine for me, should I run other tests to proove > this is ok ? Please give me some feedback. > > Vincent. > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On > > Behalf Of Vincent Harcq > > Sent: lundi 3 d�cembre 2001 2:49 > > To: 'Development JBoss' > > Subject: RE: [JBoss-dev] setEntityContext called at pool push > > time (because of reclaim usage in EntityInstancePool) > > > > > > My last post is wrong, it is in fact a lot more simple: > > > > JBOSS 2.4.4 almost latest CVS > > > > Entity instances are created by the pool on the get() method > > The creation is followed by setEntityContext The problem is > > that the free() method is never called on EntityInstancePool > > (except by the passivation method). So an entity bean is > > never push to the pool. So the pool is always empty for > > entity beans. So on my next call, the > > instanciation/setEntityContext happens again. > > > > That's why I see a lot of setEntityContext() happening and > > this why I see this this as a performance killer because I do > > a lot of jndi lookup there. > > > > Is this a normal behaviour or does it hide something ? > > > > Regards. > > Vincent. > > > > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > > _______________________________________________ > > Jboss-development mailing list > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-development > > > > > > > _________________________________________________________ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > > > > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
