Author: richard.opalka(a)jboss.com
Date: 2008-11-27 10:15:48 -0500 (Thu, 27 Nov 2008)
New Revision: 8805
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
Log:
[JBWS-2268] ugly hack
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2008-11-27
15:13:54 UTC (rev 8804)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultEndpoint.java 2008-11-27
15:15:48 UTC (rev 8805)
@@ -28,6 +28,7 @@
import javax.management.ObjectName;
import javax.management.MalformedObjectNameException;
+import org.jboss.wsf.common.javax.PreDestroyHolder;
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
@@ -238,14 +239,20 @@
@Override
public <T> T addAttachment(Class<T> clazz, Object obj)
{
- assertEndpointSetterAccess();
+ if (!clazz.equals(PreDestroyHolder.class)) // JBWS-2268 hack
+ {
+ assertEndpointSetterAccess();
+ }
return super.addAttachment(clazz, obj);
}
@Override
public <T> T removeAttachment(Class<T> key)
{
- assertEndpointSetterAccess();
+ if (!key.equals(PreDestroyHolder.class)) // JBWS-2268 hack
+ {
+ assertEndpointSetterAccess();
+ }
return super.removeAttachment(key);
}
Show replies by date