Author: heiko.braun(a)jboss.com
Date: 2007-08-10 09:31:27 -0400 (Fri, 10 Aug 2007)
New Revision: 4312
Modified:
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/DefaultInvocationHandler.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DefaultInvocationHandler.java
Log:
Cache SPI artifacts
Modified:
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java
===================================================================
---
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java 2007-08-10
13:31:26 UTC (rev 4311)
+++
container/jboss40/trunk/src/main/java/org/jboss/wsf/container/jboss40/DefaultInvocationHandler.java 2007-08-10
13:31:27 UTC (rev 4312)
@@ -45,6 +45,15 @@
*/
public class DefaultInvocationHandler extends InvocationHandler
{
+ private SPIProvider spiProvider;
+ private ResourceInjectorFactory resourceInjectorFactory;
+
+ public DefaultInvocationHandler()
+ {
+ spiProvider = SPIProviderResolver.getInstance().getProvider();
+ resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
+ }
+
public Invocation createInvocation()
{
return new Invocation();
@@ -84,9 +93,7 @@
WebServiceContext wsContext =
invContext.getAttachment(WebServiceContext.class);
if (wsContext != null)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ResourceInjectorFactory factory =
spiProvider.getSPI(ResourceInjectorFactory.class);
- ResourceInjector injector = factory.newResourceInjector();
+ ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
injector.inject(targetBean, wsContext);
}
Modified:
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/DefaultInvocationHandler.java
===================================================================
---
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/DefaultInvocationHandler.java 2007-08-10
13:31:26 UTC (rev 4311)
+++
container/jboss42/trunk/src/main/java/org/jboss/wsf/container/jboss42/DefaultInvocationHandler.java 2007-08-10
13:31:27 UTC (rev 4312)
@@ -45,6 +45,15 @@
*/
public class DefaultInvocationHandler extends InvocationHandler
{
+ private SPIProvider spiProvider;
+ private ResourceInjectorFactory resourceInjectorFactory;
+
+ public DefaultInvocationHandler()
+ {
+ spiProvider = SPIProviderResolver.getInstance().getProvider();
+ resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
+ }
+
public Invocation createInvocation()
{
return new Invocation();
@@ -84,9 +93,8 @@
WebServiceContext wsContext =
invContext.getAttachment(WebServiceContext.class);
if (wsContext != null)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ResourceInjectorFactory factory =
spiProvider.getSPI(ResourceInjectorFactory.class);
- ResourceInjector injector = factory.newResourceInjector();
+
+ ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
injector.inject(targetBean, wsContext);
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DefaultInvocationHandler.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DefaultInvocationHandler.java 2007-08-10
13:31:26 UTC (rev 4311)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/DefaultInvocationHandler.java 2007-08-10
13:31:27 UTC (rev 4312)
@@ -45,6 +45,15 @@
*/
public class DefaultInvocationHandler extends InvocationHandler
{
+ private SPIProvider spiProvider;
+ private ResourceInjectorFactory resourceInjectorFactory;
+
+ public DefaultInvocationHandler()
+ {
+ spiProvider = SPIProviderResolver.getInstance().getProvider();
+ resourceInjectorFactory = spiProvider.getSPI(ResourceInjectorFactory.class);
+ }
+
public Invocation createInvocation()
{
return new Invocation();
@@ -84,9 +93,7 @@
WebServiceContext wsContext =
invContext.getAttachment(WebServiceContext.class);
if (wsContext != null)
{
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ResourceInjectorFactory factory =
spiProvider.getSPI(ResourceInjectorFactory.class);
- ResourceInjector injector = factory.newResourceInjector();
+ ResourceInjector injector = resourceInjectorFactory.newResourceInjector();
injector.inject(targetBean, wsContext);
}
Show replies by date