Author: richard.opalka(a)jboss.com
Date: 2011-08-09 18:54:28 -0400 (Tue, 09 Aug 2011)
New Revision: 14796
Modified:
common/branches/jbossws-common-1.4.1.SP1/src/main/java/org/jboss/wsf/common/injection/ThreadLocalAwareWebServiceContext.java
Log:
[JBWS-3337] fixing singleton serialization
Modified:
common/branches/jbossws-common-1.4.1.SP1/src/main/java/org/jboss/wsf/common/injection/ThreadLocalAwareWebServiceContext.java
===================================================================
---
common/branches/jbossws-common-1.4.1.SP1/src/main/java/org/jboss/wsf/common/injection/ThreadLocalAwareWebServiceContext.java 2011-08-09
20:04:04 UTC (rev 14795)
+++
common/branches/jbossws-common-1.4.1.SP1/src/main/java/org/jboss/wsf/common/injection/ThreadLocalAwareWebServiceContext.java 2011-08-09
22:54:28 UTC (rev 14796)
@@ -40,10 +40,10 @@
private static final long serialVersionUID = 126557512266764152L;
- private static final transient ThreadLocalAwareWebServiceContext SINGLETON = new
ThreadLocalAwareWebServiceContext();
+ private static final ThreadLocalAwareWebServiceContext SINGLETON = new
ThreadLocalAwareWebServiceContext();
private final transient ThreadLocal<WebServiceContext> contexts = new
InheritableThreadLocal<WebServiceContext>();
-
+
public static ThreadLocalAwareWebServiceContext getInstance()
{
return SINGLETON;
@@ -115,4 +115,9 @@
return delegee.isUserInRole(role);
}
+ protected Object readResolve()
+ {
+ return SINGLETON;
+ }
+
}