[jboss-cvs] JBossAS SVN: r92112 - branches/Branch_5_x/webservices/src/main/org/jboss/webservices/integration/invocation.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Aug 7 06:45:38 EDT 2009


Author: alessio.soldano at jboss.com
Date: 2009-08-07 06:45:38 -0400 (Fri, 07 Aug 2009)
New Revision: 92112

Modified:
   branches/Branch_5_x/webservices/src/main/org/jboss/webservices/integration/invocation/InvocationHandlerJSE.java
Log:
[JBWS-2662] Reducing memory usage cleaning ws context reference from the cached target bean, considering it will always be re-injected later


Modified: branches/Branch_5_x/webservices/src/main/org/jboss/webservices/integration/invocation/InvocationHandlerJSE.java
===================================================================
--- branches/Branch_5_x/webservices/src/main/org/jboss/webservices/integration/invocation/InvocationHandlerJSE.java	2009-08-07 08:28:33 UTC (rev 92111)
+++ branches/Branch_5_x/webservices/src/main/org/jboss/webservices/integration/invocation/InvocationHandlerJSE.java	2009-08-07 10:45:38 UTC (rev 92112)
@@ -97,15 +97,21 @@
 
          InvocationContext invContext = epInv.getInvocationContext();
          WebServiceContext wsContext = invContext.getAttachment(WebServiceContext.class);
+         ResourceInjector  injector = null;
          if (wsContext != null)
          {
-            ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
+            injector = resourceInjectorFactory.newResourceInjector();
             injector.inject(targetBean, wsContext);
          }
 
          Method method = getImplMethod(targetBean.getClass(), epInv.getJavaMethod());
          Object retObj = method.invoke(targetBean, epInv.getArgs());
          epInv.setReturnValue(retObj);
+         
+         if (wsContext != null) //JBWS-2662
+         {
+            injector.inject(targetBean, null);
+         }
       }
       catch (Exception e)
       {




More information about the jboss-cvs-commits mailing list