[jboss-cvs] JBossAS SVN: r68764 - branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 9 17:26:20 EST 2008
Author: thomas.diesler at jboss.com
Date: 2008-01-09 17:26:19 -0500 (Wed, 09 Jan 2008)
New Revision: 68764
Added:
branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerMDB3.java
Modified:
branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java
branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/RuntimeLoaderDeploymentAspect.java
Log:
[JBWS-1911] Support the JMS transport with JAX-WS
Modified: branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java
===================================================================
--- branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java 2008-01-09 22:26:01 UTC (rev 68763)
+++ branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerFactoryImpl.java 2008-01-09 22:26:19 UTC (rev 68764)
@@ -47,11 +47,12 @@
case JAXWS_JSE:
handler = new InvocationHandlerJAXWS();
break;
- case JAXWS_EJB21:
- handler = new InvocationHandlerEJB21();
- break;
case JAXWS_EJB3:
handler = new InvocationHandlerEJB3();
+ break;
+ case JAXWS_MDB3:
+ handler = new InvocationHandlerMDB3();
+ break;
}
if(null == handler)
Added: branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerMDB3.java
===================================================================
--- branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerMDB3.java (rev 0)
+++ branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerMDB3.java 2008-01-09 22:26:19 UTC (rev 68764)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.lang.reflect.Method;
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.InvocationContext;
+
+/**
+ * Handles invocations on MDB EJB3 endpoints.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 25-Apr-2007
+ */
+public class InvocationHandlerMDB3 extends AbstractInvocationHandler
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(InvocationHandlerMDB3.class);
+
+ public Invocation createInvocation()
+ {
+ return new Invocation();
+ }
+
+ public void init(Endpoint ep)
+ {
+
+ }
+
+ public void invoke(Endpoint ep, Invocation epInv) throws Exception
+ {
+ log.debug("Invoke: " + epInv.getJavaMethod().getName());
+
+ try
+ {
+ InvocationContext invContext = epInv.getInvocationContext();
+ Object targetBean = invContext.getTargetBean();
+ Class implClass = targetBean.getClass();
+ Method seiMethod = epInv.getJavaMethod();
+ Method implMethod = getImplMethod(implClass, seiMethod);
+
+ Object[] args = epInv.getArgs();
+ Object retObj = implMethod.invoke(targetBean, args);
+ epInv.setReturnValue(retObj);
+ }
+ catch (Exception e)
+ {
+ handleInvocationException(e);
+ }
+ }
+}
Property changes on: branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/InvocationHandlerMDB3.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/RuntimeLoaderDeploymentAspect.java
===================================================================
--- branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/RuntimeLoaderDeploymentAspect.java 2008-01-09 22:26:01 UTC (rev 68763)
+++ branches/Branch_4_2/webservices/src/main/org/jboss/wsf/container/jboss42/RuntimeLoaderDeploymentAspect.java 2008-01-09 22:26:19 UTC (rev 68764)
@@ -21,8 +21,8 @@
*/
package org.jboss.wsf.container.jboss42;
-import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -48,19 +48,18 @@
}
// EJB3 endpoints
- else if (dep.getType() == Deployment.DeploymentType.JAXRPC_EJB3
- || dep.getType() == Deployment.DeploymentType.JAXWS_EJB3 )
+ else if (dep.getType() == Deployment.DeploymentType.JAXWS_EJB3)
{
// loader provided by the deployer hook
- if(null == dep.getRuntimeClassLoader())
+ if (null == dep.getRuntimeClassLoader())
throw new IllegalArgumentException("Runtime loader not provided");
}
-
+
// EJB21 endpoints
- else if(dep.getAttachment(ApplicationMetaData.class)!=null)
+ else if (dep.getAttachment(ApplicationMetaData.class) != null)
{
// loader provided by the deployer hook
- if(null == dep.getRuntimeClassLoader())
+ if (null == dep.getRuntimeClassLoader())
throw new IllegalArgumentException("Runtime loader not provided");
}
More information about the jboss-cvs-commits
mailing list