Author: thomas.diesler(a)jboss.com
Date: 2007-08-03 05:24:35 -0400 (Fri, 03 Aug 2007)
New Revision: 4141
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
Modified:
common/trunk/.classpath
container/jboss40/trunk/.classpath
container/jboss40/trunk/ant-import/build-thirdparty.xml
container/jboss40/trunk/version.properties
container/jboss42/trunk/.classpath
container/jboss42/trunk/ant-import/build-thirdparty.xml
container/jboss42/trunk/version.properties
container/jboss50/trunk/.classpath
container/jboss50/trunk/ant-import/build-thirdparty.xml
container/jboss50/trunk/version.properties
trunk/jbossws-core/.classpath
trunk/jbossws-core/ant-import/build-thirdparty.xml
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
trunk/jbossws-core/version.properties
trunk/testsuite/.classpath
Log:
Fix eclipse classpath
Modified: common/trunk/.classpath
===================================================================
--- common/trunk/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ common/trunk/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -12,5 +12,7 @@
<classpathentry kind="lib"
path="thirdparty/jboss-common-core.jar"/>
<classpathentry kind="lib"
path="thirdparty/jboss-dependency.jar"/>
<classpathentry combineaccessrules="false" kind="src"
path="/spi"/>
+ <classpathentry kind="lib"
path="thirdparty/jboss-javaee.jar"/>
+ <classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: container/jboss40/trunk/.classpath
===================================================================
--- container/jboss40/trunk/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss40/trunk/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -13,5 +13,6 @@
<classpathentry kind="lib"
path="thirdparty/jbossws-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jsr181-api.jar"/>
<classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/dom4j.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: container/jboss40/trunk/ant-import/build-thirdparty.xml
===================================================================
--- container/jboss40/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:18:27 UTC (rev
4140)
+++ container/jboss40/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:24:35 UTC (rev
4141)
@@ -38,6 +38,8 @@
<mkdir dir="${thirdparty.dir}"/>
<get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar"
dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar"
dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true"
verbose="true"/>
+
+ <get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar"
dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar"
dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jsr181-api.jar"
dest="${thirdparty.dir}/jsr181-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/saaj-api.jar"
dest="${thirdparty.dir}/saaj-api.jar" usetimestamp="true"
verbose="true"/>
Modified: container/jboss40/trunk/version.properties
===================================================================
--- container/jboss40/trunk/version.properties 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss40/trunk/version.properties 2007-08-03 09:24:35 UTC (rev 4141)
@@ -16,5 +16,7 @@
# Thirdparty library versions
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
+
+dom4j=1.6.1
sun-jaxrpc=1.1
sun-jaxws=2.1.1
\ No newline at end of file
Modified: container/jboss42/trunk/.classpath
===================================================================
--- container/jboss42/trunk/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss42/trunk/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -11,5 +11,6 @@
<classpathentry kind="lib"
path="thirdparty/jbossws-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jsr181-api.jar"/>
<classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/dom4j.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: container/jboss42/trunk/ant-import/build-thirdparty.xml
===================================================================
--- container/jboss42/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:18:27 UTC (rev
4140)
+++ container/jboss42/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:24:35 UTC (rev
4141)
@@ -38,6 +38,8 @@
<mkdir dir="${thirdparty.dir}"/>
<get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar"
dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar"
dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true"
verbose="true"/>
+
+ <get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar"
dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar"
dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jsr181-api.jar"
dest="${thirdparty.dir}/jsr181-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/saaj-api.jar"
dest="${thirdparty.dir}/saaj-api.jar" usetimestamp="true"
verbose="true"/>
Modified: container/jboss42/trunk/version.properties
===================================================================
--- container/jboss42/trunk/version.properties 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss42/trunk/version.properties 2007-08-03 09:24:35 UTC (rev 4141)
@@ -16,5 +16,7 @@
# Thirdparty library versions
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
+
+dom4j=1.6.1
sun-jaxrpc=1.1
sun-jaxws=2.1.1
\ No newline at end of file
Modified: container/jboss50/trunk/.classpath
===================================================================
--- container/jboss50/trunk/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss50/trunk/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -11,5 +11,6 @@
<classpathentry kind="lib"
path="thirdparty/jbossws-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/jsr181-api.jar"/>
<classpathentry kind="lib" path="thirdparty/saaj-api.jar"/>
+ <classpathentry kind="lib" path="thirdparty/dom4j.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: container/jboss50/trunk/ant-import/build-thirdparty.xml
===================================================================
--- container/jboss50/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:18:27 UTC (rev
4140)
+++ container/jboss50/trunk/ant-import/build-thirdparty.xml 2007-08-03 09:24:35 UTC (rev
4141)
@@ -38,6 +38,8 @@
<mkdir dir="${thirdparty.dir}"/>
<get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar"
dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar"
dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true"
verbose="true"/>
+
+ <get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar"
dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jaxws-api.jar"
dest="${thirdparty.dir}/jaxws-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/jsr181-api.jar"
dest="${thirdparty.dir}/jsr181-api.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/sun-jaxws/${sun-jaxws}/lib/saaj-api.jar"
dest="${thirdparty.dir}/saaj-api.jar" usetimestamp="true"
verbose="true"/>
Modified: container/jboss50/trunk/version.properties
===================================================================
--- container/jboss50/trunk/version.properties 2007-08-03 09:18:27 UTC (rev 4140)
+++ container/jboss50/trunk/version.properties 2007-08-03 09:24:35 UTC (rev 4141)
@@ -16,5 +16,7 @@
# Thirdparty library versions
jbossws-common=2.0.1.CR1
jbossws-spi=2.0.1.CR1
+
+dom4j=1.6.1
sun-jaxrpc=1.1
sun-jaxws=2.1.1
\ No newline at end of file
Deleted:
framework/trunk/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java 2007-08-03
09:18:27 UTC (rev 4140)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/transport/jms/JMSTransportSupport.java 2007-08-03
09:24:35 UTC (rev 4141)
@@ -1,268 +0,0 @@
-/*
- * 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.framework.transport.jms;
-
-// $Id:JMSTransportSupport.java 915 2006-09-08 08:40:45Z thomas.diesler(a)jboss.com $
-
-import org.jboss.logging.Logger;
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.invocation.InvocationContext;
-import org.jboss.wsf.spi.invocation.RequestHandler;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-
-import javax.ejb.EJBException;
-import javax.ejb.MessageDrivenBean;
-import javax.ejb.MessageDrivenContext;
-import javax.jms.*;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-import javax.xml.soap.SOAPException;
-import java.io.*;
-import java.lang.IllegalStateException;
-import java.rmi.RemoteException;
-
-/**
- * The abstract base class for MDBs that want to act as web service endpoints.
- * A subclass should only need to implement the service endpoint interface.
- *
- * @author Thomas.Diesler(a)jboss.org
- */
-public abstract class JMSTransportSupport implements MessageDrivenBean, MessageListener
-{
- // logging support
- protected Logger log = Logger.getLogger(JMSTransportSupport.class);
-
- //private MessageDrivenContext mdbCtx;
- private QueueConnectionFactory queueFactory;
-
- /**
- * All messages come in here, if it is a BytesMessage we pass it on for further
processing.
- */
- public void onMessage(Message message)
- {
- try
- {
- String msgStr = null;
- if (message instanceof BytesMessage)
- {
- msgStr = getMessageStr((BytesMessage)message);
- }
- else if (message instanceof TextMessage)
- {
- msgStr = ((TextMessage)message).getText();
- }
- else
- {
- log.warn("Invalid message type: " + message);
- return;
- }
-
- log.debug("Incomming SOAP message: " + msgStr);
-
- String fromName = null;
- Destination destination = message.getJMSDestination();
- if (destination instanceof Queue)
- fromName = "queue/" + ((Queue)destination).getQueueName();
- if (destination instanceof Topic)
- fromName = "topic/" + ((Topic)destination).getTopicName();
-
- InputStream inputStream = new ByteArrayInputStream(msgStr.getBytes());
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream(1024);
- processSOAPMessage(fromName, inputStream, outputStream);
-
- msgStr = new String(outputStream.toByteArray());
- log.debug("Outgoing SOAP message: " + msgStr);
-
- if (msgStr.length() > 0)
- {
- Queue replyQueue = getReplyQueue(message);
- if (replyQueue != null)
- {
- sendResponse(replyQueue, msgStr);
- }
- else
- {
- log.warn("No reply queue, ignore response message");
- }
- }
- else
- {
- log.debug("SOAP response message is null");
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new EJBException(e);
- }
- }
-
- protected void processSOAPMessage(String fromName, InputStream inputStream,
OutputStream outStream) throws SOAPException, IOException, RemoteException
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- EndpointRegistry epRegistry =
spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
-
- Endpoint endpoint = getEndpointForDestination(epRegistry, fromName);
-
- if (endpoint == null)
- throw new IllegalStateException("Cannot find endpoint for: " +
fromName);
-
- log.debug("dipatchMessage: " + endpoint.getName());
-
- RequestHandler reqHandler = endpoint.getRequestHandler();
-
- try
- {
- InvocationContext invContext = new InvocationContext();
- invContext.setTargetBean(this);
-
- reqHandler.handleRequest(endpoint, inputStream, outStream, invContext);
- }
- catch (Exception ex)
- {
- throw new RemoteException("Cannot process SOAP request", ex);
- }
- }
-
- // The destination jndiName is encoded in the service object name under key
'jms'
- private Endpoint getEndpointForDestination(EndpointRegistry epRegistry, String
fromName)
- {
- Endpoint endpoint = null;
- for (ObjectName oname : epRegistry.getEndpoints())
- {
- Endpoint aux = epRegistry.getEndpoint(oname);
- String jmsProp = aux.getName().getKeyProperty("jms");
- if (jmsProp != null && jmsProp.equals(fromName))
- {
- endpoint = aux;
- break;
- }
- }
- return endpoint;
- }
-
- private String getMessageStr(BytesMessage message) throws Exception
- {
- byte[] buffer = new byte[8 * 1024];
- ByteArrayOutputStream out = new ByteArrayOutputStream(buffer.length);
- int read = message.readBytes(buffer);
- while (read != -1)
- {
- out.write(buffer, 0, read);
- read = message.readBytes(buffer);
- }
-
- byte[] msgBytes = out.toByteArray();
- return new String(msgBytes);
- }
-
- /**
- * Get the reply queue.
- */
- protected Queue getReplyQueue(Message message) throws JMSException
- {
- Queue replyQueue = (Queue)message.getJMSReplyTo();
- return replyQueue;
- }
-
- /**
- * Respond to the call by sending a message to the reply queue
- */
- protected void sendResponse(Queue replyQueue, String msgStr) throws SOAPException,
IOException, JMSException
- {
- QueueConnection qc = queueFactory.createQueueConnection();
- QueueSession session = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- QueueSender sender = null;
- try
- {
- sender = session.createSender(replyQueue);
- TextMessage responseMessage = session.createTextMessage(msgStr);
- sender.send(responseMessage);
- log.info("Sent response");
- }
- finally
- {
- try
- {
- sender.close();
- }
- catch (JMSException ignored)
- {
- }
- try
- {
- session.close();
- }
- catch (JMSException ignored)
- {
- }
- try
- {
- qc.close();
- }
- catch (JMSException ignored)
- {
- }
- }
- }
-
- // MDB lifecycle methods
********************************************************************************************
-
- public void ejbCreate()
- {
- try
- {
- InitialContext ctx = new InitialContext();
- queueFactory =
(QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception e)
- {
- throw new NestedRuntimeException(e);
- }
- }
-
- /**
- * A container invokes this method before it ends the life of the message-driven
object.
- */
- public void ejbRemove() throws EJBException
- {
- }
-
- /**
- * Set the associated message-driven context.
- */
- public void setMessageDrivenContext(MessageDrivenContext ctx) throws EJBException
- {
- //this.mdbCtx = ctx;
- }
-}
Modified: trunk/jbossws-core/.classpath
===================================================================
--- trunk/jbossws-core/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ trunk/jbossws-core/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -37,5 +37,6 @@
<classpathentry kind="lib" path="thirdparty/concurrent.jar"/>
<classpathentry combineaccessrules="false" kind="src"
path="/spi"/>
<classpathentry combineaccessrules="false" kind="src"
path="/common"/>
+ <classpathentry kind="lib" path="thirdparty/junit.jar"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>
Modified: trunk/jbossws-core/ant-import/build-thirdparty.xml
===================================================================
--- trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-03 09:18:27 UTC (rev 4140)
+++ trunk/jbossws-core/ant-import/build-thirdparty.xml 2007-08-03 09:24:35 UTC (rev 4141)
@@ -94,6 +94,7 @@
<get
src="${jboss.repository}/jboss/security/${jboss-security}/lib/jbosssx-src.zip"
dest="${thirdparty.dir}/jbosssx-src.zip" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jbossas/core-libs/${jbossas-core-libs}/lib/jboss-j2ee.jar"
dest="${thirdparty.dir}/jboss-j2ee.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/jbpm/bpel/${jbpm-bpel}/lib/jbpm-bpel.sar"
dest="${thirdparty.dir}/jbpm-bpel.sar" usetimestamp="true"
verbose="true" />
+ <get src="${jboss.repository}/junit/${junit}/lib/junit.jar"
dest="${thirdparty.dir}/junit.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/oswego-concurrent/${oswego-concurrent}/lib/concurrent.jar"
dest="${thirdparty.dir}/concurrent.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/qdox/${qdox}/lib/qdox.jar"
dest="${thirdparty.dir}/qdox.jar" usetimestamp="true"
verbose="true"/>
<get src="${jboss.repository}/stax-api/${stax-api}/lib/stax-api.jar"
dest="${thirdparty.dir}/stax-api.jar" usetimestamp="true"
verbose="true"/>
Modified:
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java
===================================================================
---
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2007-08-03
09:18:27 UTC (rev 4140)
+++
trunk/jbossws-core/src/test/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java 2007-08-03
09:24:35 UTC (rev 4141)
@@ -11,7 +11,7 @@
import java.rmi.RemoteException;
import org.jboss.logging.Logger;
-import org.jboss.wsf.framework.transport.jms.JMSTransportSupport;
+import org.jboss.wsf.common.transport.jms.JMSTransportSupport;
/**
* An example of a MDB acting as a web service endpoint.
Modified: trunk/jbossws-core/version.properties
===================================================================
--- trunk/jbossws-core/version.properties 2007-08-03 09:18:27 UTC (rev 4140)
+++ trunk/jbossws-core/version.properties 2007-08-03 09:24:35 UTC (rev 4141)
@@ -30,6 +30,7 @@
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.2.0.GA
+junit=3.8.1
oswego-concurrent=1.3.4
qdox=1.4
sun-hudson=1.93
Modified: trunk/testsuite/.classpath
===================================================================
--- trunk/testsuite/.classpath 2007-08-03 09:18:27 UTC (rev 4140)
+++ trunk/testsuite/.classpath 2007-08-03 09:24:35 UTC (rev 4141)
@@ -3,7 +3,6 @@
<classpathentry
excluding="org/jboss/test/ws/jaxrpc/samples/jmstransport/OrganizationJMSEndpoint.java"
kind="src" path="src/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/jboss-5.0.x"/>
- <classpathentry combineaccessrules="false" kind="src"
path="/spi"/>
<classpathentry kind="lib"
path="/integration-framework/thirdparty/activation.jar"/>
<classpathentry kind="lib"
path="/integration-framework/thirdparty/dom4j.jar"/>
<classpathentry kind="lib"
path="/integration-framework/thirdparty/jaxb-api.jar"/>
@@ -14,5 +13,6 @@
<classpathentry kind="lib"
path="/integration-framework/thirdparty/wsdl4j.jar"/>
<classpathentry kind="lib"
path="/integration-framework/thirdparty/junit.jar"/>
<classpathentry combineaccessrules="false" kind="src"
path="/common"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/spi"/>
<classpathentry kind="output" path="output/eclipse"/>
</classpath>