Author: richard.opalka(a)jboss.com
Date: 2011-06-20 10:19:37 -0400 (Mon, 20 Jun 2011)
New Revision: 14588
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
Log:
[JBWS-3318] WebServiceContext is invocation type agnostic since now
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2011-06-20
14:14:56 UTC (rev 14587)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2011-06-20
14:19:37 UTC (rev 14588)
@@ -235,7 +235,10 @@
}
- protected abstract WebServiceContext getWebServiceContext(MessageContext msgCtx);
+ protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
+ {
+ return getWebServiceContextFactory().newWebServiceContext(msgCtx);
+ }
protected Map<String, Object> removeHandlerProperties(WrappedMessageContext
ctx)
{
@@ -333,7 +336,7 @@
}
}
- protected WebServiceContextFactory getWebServiceContextFactory()
+ protected synchronized WebServiceContextFactory getWebServiceContextFactory()
{
if (contextFactory == null)
{
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java 2011-06-20
14:14:56 UTC (rev 14587)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerEJB3.java 2011-06-20
14:19:37 UTC (rev 14588)
@@ -21,11 +21,7 @@
*/
package org.jboss.wsf.stack.cxf;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.invocation.InvocationType;
-
/**
* An XFire invoker for EJB3
*
@@ -35,8 +31,5 @@
*/
public class InvokerEJB3 extends AbstractInvoker
{
- protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
- {
- return
getWebServiceContextFactory().newWebServiceContext(InvocationType.JAXWS_EJB3, msgCtx);
- }
+ // TODO: remove this class
}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java 2011-06-20
14:14:56 UTC (rev 14587)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/InvokerJSE.java 2011-06-20
14:19:37 UTC (rev 14588)
@@ -21,11 +21,7 @@
*/
package org.jboss.wsf.stack.cxf;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-import org.jboss.wsf.spi.invocation.InvocationType;
-
/**
* An CXF invoker for JSE
*
@@ -35,8 +31,5 @@
*/
public class InvokerJSE extends AbstractInvoker
{
- protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
- {
- return getWebServiceContextFactory().newWebServiceContext(InvocationType.JAXWS_JSE,
msgCtx);
- }
+ // TODO: remove this class
}
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2011-06-20
14:14:56 UTC (rev 14587)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2011-06-20
14:19:37 UTC (rev 14588)
@@ -24,10 +24,8 @@
import javax.xml.ws.handler.MessageContext;
import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-import org.jboss.ws.common.invocation.WebServiceContextEJB;
-import org.jboss.ws.common.invocation.WebServiceContextJSE;
+import org.jboss.ws.common.invocation.WebServiceContextAdapter;
import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
-import org.jboss.wsf.spi.invocation.InvocationType;
import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
@@ -38,15 +36,9 @@
*/
public class WebServiceContextFactoryImpl extends WebServiceContextFactory
{
- public ExtensibleWebServiceContext newWebServiceContext(InvocationType type,
MessageContext messageContext)
+ @Override
+ public ExtensibleWebServiceContext newWebServiceContext(MessageContext
messageContext)
{
- ExtensibleWebServiceContext context = null;
-
- if (type.toString().indexOf("EJB") != -1 ||
type.toString().indexOf("MDB") != -1)
- context = new WebServiceContextEJB(new WebServiceContextImpl(messageContext));
- else
- context = new WebServiceContextJSE(new WebServiceContextImpl(messageContext));
-
- return context;
+ return new WebServiceContextAdapter(new WebServiceContextImpl(messageContext));
}
}
Show replies by date