Author: richard.opalka(a)jboss.com
Date: 2010-12-13 08:10:10 -0500 (Mon, 13 Dec 2010)
New Revision: 13471
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
Log:
[JBWS-3177] previous fix was wrong - this is the proper one
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
===================================================================
---
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-13
13:06:35 UTC (rev 13470)
+++
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-13
13:10:10 UTC (rev 13471)
@@ -22,6 +22,8 @@
package org.jboss.wsf.common.invocation;
import java.lang.reflect.Method;
+import java.util.LinkedList;
+import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -42,7 +44,7 @@
private static final String POJO_JNDI_PREFIX = "java:comp/env/";
- private boolean initialized;
+ private List<Long> initializedEndpoints = new LinkedList<Long>();
/**
* Constructor.
@@ -92,11 +94,12 @@
}
}
- if (!this.initialized)
+ final long targetBeanId = System.identityHashCode(targetBean);
+ if (!this.initializedEndpoints.contains(targetBeanId))
{
// notify subclasses
this.onEndpointInstantiated(endpoint, invocation);
- this.initialized = true;
+ this.initializedEndpoints.add(targetBeanId);
}
return targetBean;
Show replies by date