From: Alexey L. <lou...@us...> - 2004-06-30 18:35:33
|
User: loubyansky Date: 04/06/30 11:35:26 Modified: src/main/org/jboss/ejb Tag: Branch_3_2 EntityEnterpriseContext.java Log: optimization. Do not create EJB[Local]Object ahead in activation. Create them on demand instead. If ctx.getEJB[Local]Object() is not used, we create 2 times(+) less proxies. Revision Changes Path No revision No revision 1.27.2.6 +9 -1 jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java Index: EntityEnterpriseContext.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java,v retrieving revision 1.27.2.5 retrieving revision 1.27.2.6 diff -u -r1.27.2.5 -r1.27.2.6 --- EntityEnterpriseContext.java 27 Apr 2004 22:49:27 -0000 1.27.2.5 +++ EntityEnterpriseContext.java 30 Jun 2004 18:35:23 -0000 1.27.2.6 @@ -26,7 +26,7 @@ * @author <a href="mailto:ric...@te...">Rickard �berg</a> * @author <a href="mailto:mar...@te...">Marc Fleury</a> * @author <a href="mailto:do...@mv...">Daniel OConnor</a> - * @version $Revision: 1.27.2.5 $ + * @version $Revision: 1.27.2.6 $ */ public class EntityEnterpriseContext extends EnterpriseContext { @@ -118,6 +118,10 @@ { // Context can have no EJBObject (created by finds) in which case // we need to wire it at call time + if(ejbObject == null && con.getProxyFactory() != null) + { + ejbObject = (EJBObject)con.getProxyFactory().getEntityEJBObject(id); + } return ejbObject; } @@ -128,6 +132,10 @@ public EJBLocalObject getEJBLocalObject() { + if(ejbLocalObject == null && con.getLocalHomeClass() != null) + { + ejbLocalObject = ((EntityContainer)con).getLocalProxyFactory().getEntityEJBLocalObject(id); + } return ejbLocalObject; } |