[jbossws-commits] JBossWS SVN: r15073 - in common/trunk/src/main/java/org/jboss/ws/common: invocation and 1 other directory.
jbossws-commits at lists.jboss.org
jbossws-commits at lists.jboss.org
Tue Oct 11 04:36:52 EDT 2011
Author: richard.opalka at jboss.com
Date: 2011-10-11 04:36:52 -0400 (Tue, 11 Oct 2011)
New Revision: 15073
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/ReferenceFactory.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
Log:
initialization flag is modifyable
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/ReferenceFactory.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/ReferenceFactory.java 2011-10-11 08:36:03 UTC (rev 15072)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/ReferenceFactory.java 2011-10-11 08:36:52 UTC (rev 15073)
@@ -60,7 +60,7 @@
private static final class ReferenceImpl implements Reference {
private final Object reference;
- private final boolean initialized;
+ private volatile boolean initialized;
private ReferenceImpl(final Object reference, final boolean initialized) {
this.reference = reference;
@@ -77,6 +77,11 @@
return initialized;
}
+ @Override
+ public void setInitialized() {
+ initialized = true;
+ }
+
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2011-10-11 08:36:03 UTC (rev 15072)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2011-10-11 08:36:52 UTC (rev 15073)
@@ -65,20 +65,18 @@
final Reference reference = endpoint.getInstanceProvider().getInstance(_targetBean.getClass().getName());
final Object targetBean = reference.getValue();
- if (!reference.isInitialized() && injectionsMD != null)
+ if (!reference.isInitialized())
{
this.log.debug("Injecting resources on JAXWS JSE endpoint: " + targetBean);
InjectionHelper.injectResources(targetBean, injectionsMD, endpoint.getJNDIContext());
- }
- if (!reference.isInitialized())
- {
- InjectionHelper.injectWebServiceContext(targetBean, ThreadLocalAwareWebServiceContext.getInstance());
-
this.log.debug("Calling postConstruct method on JAXWS JSE endpoint: " + targetBean);
InjectionHelper.callPostConstructMethod(targetBean);
+ reference.setInitialized();
}
+ InjectionHelper.injectWebServiceContext(targetBean, ThreadLocalAwareWebServiceContext.getInstance());
+
endpoint.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
}
More information about the jbossws-commits
mailing list