Patches item #488940, was opened at 2001-12-04 08:25
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=488940&group_id=22866

Category: JBossServer
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 9
Submitted By: Vincent Harcq (vharcq)
Assigned to: Nobody/Anonymous (nobody)
Summary: Entity Instances are never Pooled

Initial Comment:
I try here as this receives no attention on jboss-dev .
Version : JBoss 2.4.4
The Pool of any entity containers is always empty.
This imply that heavy setEntityContext are run for 
Home methods calls.
Whenever I call a home method on an entity bean a new 
instance of the entity is created.
I could solve that by pushing back the context to the 
pool in EntityInstanceInterceptor.invokeHome.
This requires change to AbstractInstanceCache and 
EntityCache.

====================================================

diff -r1.9.6.2 EntityInstancePool.java
15a16
> import org.jboss.logging.Logger;
61a63
>        //Logger.debug("Free 
instance:"+"#ID="+ctx.getId()
+"#TRANS="+ctx.getTransaction()
+"#RECLAIM="+reclaim+"#CLASS="+getContainer
().getBeanClass());
66c68,69
<        if (reclaim) super.free(ctx);
---
>        // why ? if (reclaim)
>        super.free(ctx);

====================================================

diff -r1.9.6.3 AbstractInstancePool.java
134c134
<       //DEBUG      Logger.debug("Get 
instance "+this);
---
>       //Logger.debug("Get 
instance "+this+"#"+pool.empty()+"#"+getContainer
().getBeanClass());
166c166
<       //DEBUG      Logger.debug("Free 
instance:"+ctx.getId()+"#"+ctx.getTransaction());
---
>       //Logger.debug(maxSize+" Free 
instance:"+this+"#"+ctx.getId()+"#"+ctx.getTransaction
()+"#"+reclaim+"#"+getContainer().getBeanClass());
174c174,175
<             if (this.reclaim)
---
>             if ( this.reclaim
>             || (ctx.getId() == null && 
ctx.getTransaction() == null) )

====================================================

This is a performance problem when doing for example 
jndi lookup (yes even when caching home interfaces in 
a singleton map)
I am quite sure this problem did not exist in previous 
version.

As this touch important files, I will not go and 
implement that on cvs without further looks from 
experts.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376687&aid=488940&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to