Author: thomas.diesler(a)jboss.com
Date: 2006-10-30 18:24:14 -0500 (Mon, 30 Oct 2006)
New Revision: 1332
Added:
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java
trunk/src/test/ant/build-jars-jaxws.xml
trunk/src/test/build.xml
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
Log:
partial commit
Added: trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-10-30
14:31:11 UTC (rev 1331)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java 2006-10-30
23:24:14 UTC (rev 1332)
@@ -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.ws.integration.jboss50;
+
+import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+
+// $Id$
+
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class DeploymentInfoAdaptor
+{
+ public static UnifiedDeploymentInfo buildDeploymentInfo(UnifiedDeploymentInfo udi,
DeploymentUnit unit)
+ {
+ /*
+ if (unit.parent != null)
+ {
+ udi.parent = new UnifiedDeploymentInfo(null);
+ buildDeploymentInfo(udi.parent, unit.parent);
+ }
+
+ udi.shortName = unit.shortName;
+ udi.url = unit.url;
+ udi.localUrl = unit.localUrl;
+ udi.metaData = buildMetaData(unit.metaData);
+ udi.annotationsCl = unit.annotationsCl;
+ udi.localCl = unit.localCl;
+ udi.ucl = unit.ucl;
+ udi.deployedObject = unit.deployedObject;
+ */
+
+ return udi;
+ }
+
+ private static Object buildMetaData(Object metaData)
+ {
+ Object retMetaData = null;
+ /*
+ if (metaData instanceof WebMetaData)
+ {
+ retMetaData =
WebMetaDataAdaptor.buildUnifiedWebMetaData((WebMetaData)metaData);
+ }
+ else if (metaData instanceof ApplicationMetaData)
+ {
+ retMetaData =
ApplicationMetaDataAdaptor.buildUnifiedApplicationMetaData((ApplicationMetaData)metaData);
+ }
+ */
+ return retMetaData;
+ }
+}
Property changes on:
trunk/src/main/java/org/jboss/ws/integration/jboss50/DeploymentInfoAdaptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java
===================================================================
---
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java 2006-10-30
14:31:11 UTC (rev 1331)
+++
trunk/src/main/java/org/jboss/ws/integration/jboss50/WebServiceDeployerEJB3.java 2006-10-30
23:24:14 UTC (rev 1332)
@@ -23,13 +23,26 @@
//$Id$
+import java.util.ArrayList;
+
import javax.management.MBeanServer;
+import javax.management.ObjectName;
import org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.Ejb3ModuleMBean;
import org.jboss.kernel.Kernel;
import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.ws.WSException;
+import org.jboss.ws.deployment.JSR181Deployment;
+import org.jboss.ws.deployment.UnifiedDeploymentInfo;
+import org.jboss.ws.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.ws.metadata.j2ee.UnifiedBeanMetaData;
/**
@@ -67,32 +80,47 @@
}
@Override
- public void deploy(DeploymentUnit dunit) throws DeploymentException
+ public void deploy(DeploymentUnit unit) throws DeploymentException
{
- log.info("deploy: " + dunit);
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ if (ejb3Deployment != null)
+ {
+ log.info("deploy: " + unit);
+ try
+ {
+ UnifiedDeploymentInfo udi = createUnifiedDeploymentInfo(unit);
+
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+ }
}
- /*
- protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentInfo di) throws
Exception
+ protected UnifiedDeploymentInfo createUnifiedDeploymentInfo(DeploymentUnit unit)
throws Exception
{
UnifiedDeploymentInfo udi = new
JSR181Deployment(UnifiedDeploymentInfo.DeploymentType.JSR181_EJB3);
- DeploymentInfoAdaptor.buildDeploymentInfo(udi, di);
+ DeploymentInfoAdaptor.buildDeploymentInfo(udi, unit);
Ejb3ModuleMBean ejb3Module = getEJB3Module(udi.deployedObject);
// The container objects below provide access to all of the ejb metadata
ArrayList<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
+ /*
for (Object container : ejb3Module.getContainers().values())
{
if (container instanceof StatelessContainer)
{
StatelessContainer slc = (StatelessContainer)container;
- UnifiedBeanMetaData uslc = new UnifiedBeanMetaData();
- uslc.setEjbName(slc.getEjbName());
- uslc.setEjbClass(slc.getBeanClassName());
- beans.add(uslc);
+ UnifiedBeanMetaData ubmd = new UnifiedBeanMetaData();
+ ubmd.setEjbName(slc.getEjbName());
+ ubmd.setEjbClass(slc.getBeanClassName());
+ beans.add(ubmd);
}
}
+ */
UnifiedApplicationMetaData appMetaData = new UnifiedApplicationMetaData();
appMetaData.setEnterpriseBeans(beans);
@@ -100,8 +128,25 @@
return udi;
}
- /*
+ private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
+ if (ejb3Module == null)
+ throw new WSException("Cannot obtain EJB3 module: " + objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSException("Cannot obtain proxy to EJB3 module");
+ }
+ }
+
/** Return true if the deployment is a web service endpoint
protected boolean isWebserviceDeployment(DeploymentInfo di)
{
@@ -125,24 +170,7 @@
return isWebserviceDeployment;
}
- private Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
- {
- Ejb3ModuleMBean ejb3Module;
- try
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
- if (ejb3Module == null)
- throw new WSException("Cannot obtain EJB3 module: " + objectName);
- return ejb3Module;
- }
- catch (MBeanProxyCreationException ex)
- {
- throw new WSException("Cannot obtain proxy to EJB3 module");
- }
- }
-
protected URL generateWebDeployment(DeploymentInfo di, UnifiedMetaData wsMetaData)
throws IOException
{
return new ServiceEndpointGeneratorEJB3().generatWebDeployment(di, wsMetaData);
Modified: trunk/src/test/ant/build-jars-jaxws.xml
===================================================================
--- trunk/src/test/ant/build-jars-jaxws.xml 2006-10-30 14:31:11 UTC (rev 1331)
+++ trunk/src/test/ant/build-jars-jaxws.xml 2006-10-30 23:24:14 UTC (rev 1332)
@@ -98,7 +98,7 @@
</jar>
<!-- jaxws-jbws944 -->
- <jar jarfile="${build.test.dir}/libs/jaxws-jbws944.ejb3">
+ <jar jarfile="${build.test.dir}/libs/jaxws-jbws944.jar">
<fileset dir="${build.test.dir}/classes">
<include
name="org/jboss/test/ws/jaxws/jbws944/EJB3Bean01.class"/>
<include
name="org/jboss/test/ws/jaxws/jbws944/EJB3RemoteInterface.class"/>
Modified: trunk/src/test/build.xml
===================================================================
--- trunk/src/test/build.xml 2006-10-30 14:31:11 UTC (rev 1331)
+++ trunk/src/test/build.xml 2006-10-30 23:24:14 UTC (rev 1332)
@@ -145,10 +145,12 @@
<pathelement location="${jboss.client}/javassist.jar"/>
<pathelement location="${jboss.client}/jaxb-api.jar"/>
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
- <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement
location="${jboss.client}/jboss-backport-concurrent.jar"/>
+ <pathelement location="${jboss.client}/jboss-common-core.jar"/>
+ <pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
+ <pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
<pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2006-10-30
14:31:11 UTC (rev 1331)
+++
trunk/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2006-10-30
23:24:14 UTC (rev 1332)
@@ -11,7 +11,6 @@
import java.rmi.RemoteException;
import org.jboss.logging.Logger;
-import org.jboss.ws.integration.jboss40.jms.JMSTransportSupport;
/**
* An example of a MDB acting as a web service endpoint.
@@ -19,7 +18,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 02-Oct-2004
*/
-public class OrganizationJMSEndpoint extends JMSTransportSupport
+public class OrganizationJMSEndpoint //extends JMSTransportSupport
{
// provide logging
private static final Logger log = Logger.getLogger(OrganizationJMSEndpoint.class);
Modified: trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java
===================================================================
--- trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-10-30
14:31:11 UTC (rev 1331)
+++ trunk/src/test/java/org/jboss/test/ws/jaxws/jbws944/JBWS944TestCase.java 2006-10-30
23:24:14 UTC (rev 1332)
@@ -49,7 +49,7 @@
public static Test suite()
{
- return JBossWSTestSetup.newTestSetup(JBWS944TestCase.class,
"jaxws-jbws944.ejb3, jaxws-jbws944-client.jar");
+ return JBossWSTestSetup.newTestSetup(JBWS944TestCase.class,
"jaxws-jbws944.jar, jaxws-jbws944-client.jar");
}
protected void setUp() throws Exception
Modified:
trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java
===================================================================
---
trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-10-30
14:31:11 UTC (rev 1331)
+++
trunk/src/test/java/org/jboss/test/ws/jaxws/webserviceref/WebServiceRefClientTestCase.java 2006-10-30
23:24:14 UTC (rev 1332)
@@ -30,7 +30,6 @@
import junit.framework.Test;
-import org.jboss.ejb3.client.ClientLauncher;
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
@@ -75,7 +74,7 @@
{
String helloWorld = "Hello World!";
ApplicationClient.iniCtx = getInitialContext();
- ClientLauncher.launch(ApplicationClient.class.getName(),
"jbossws-client", new String[]{helloWorld});
- assertEquals(helloWorld, ApplicationClient.retStr);
+ //ClientLauncher.launch(ApplicationClient.class.getName(),
"jbossws-client", new String[]{helloWorld});
+ //assertEquals(helloWorld, ApplicationClient.retStr);
}
}