Author: ropalka
Date: 2014-01-15 10:17:39 -0500 (Wed, 15 Jan 2014)
New Revision: 18242
Modified:
common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java
Log:
prepare for JSR-236 support - exposing current msg context retrieval method
Modified:
common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java 2014-01-15
11:06:08 UTC (rev 18241)
+++
common/trunk/src/main/java/org/jboss/ws/common/injection/ThreadLocalAwareWebServiceContext.java 2014-01-15
15:17:39 UTC (rev 18242)
@@ -56,31 +56,36 @@
public EndpointReference getEndpointReference(final Element... referenceParameters)
{
- return getWebServiceContext().getEndpointReference(referenceParameters);
+ return getWebServiceContextInternal().getEndpointReference(referenceParameters);
}
public <T extends EndpointReference> T getEndpointReference(final Class<T>
clazz, final Element... referenceParameters)
{
- return getWebServiceContext().getEndpointReference(clazz, referenceParameters);
+ return getWebServiceContextInternal().getEndpointReference(clazz,
referenceParameters);
}
public MessageContext getMessageContext()
{
- return getWebServiceContext().getMessageContext();
+ return getWebServiceContextInternal().getMessageContext();
}
public Principal getUserPrincipal()
{
- return getWebServiceContext().getUserPrincipal();
+ return getWebServiceContextInternal().getUserPrincipal();
}
public boolean isUserInRole(String role)
{
- return getWebServiceContext().isUserInRole(role);
+ return getWebServiceContextInternal().isUserInRole(role);
}
- private WebServiceContext getWebServiceContext()
+ public WebServiceContext getWebServiceContext()
{
+ return contexts.get();
+ }
+
+ private WebServiceContext getWebServiceContextInternal()
+ {
final WebServiceContext delegate = contexts.get();
if (delegate == null)
Show replies by date