[jboss-svn-commits] JBL Code SVN: r16067 - in labs/jbossesb/workspace/dbevenius/redeliver: product and 16 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Oct 25 07:12:24 EDT 2007
Author: beve
Date: 2007-10-25 07:12:24 -0400 (Thu, 25 Oct 2007)
New Revision: 16067
Added:
labs/jbossesb/workspace/dbevenius/redeliver/product/install/conf/actionArtifactMap.properties
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/util/XPathNamespaceContext.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/LogicalEPRUnitTest.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/TestUtils.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml
Removed:
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml
labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml
Modified:
labs/jbossesb/workspace/dbevenius/redeliver/
labs/jbossesb/workspace/dbevenius/redeliver/product/build-distr.xml
labs/jbossesb/workspace/dbevenius/redeliver/product/lib/ext/juddi-1.0-SNAPSHOT.jar
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/mock/MockAction.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java
labs/jbossesb/workspace/dbevenius/redeliver/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java
labs/jbossesb/workspace/dbevenius/redeliver/qa/build.xml
Log:
Merge from main
Property changes on: labs/jbossesb/workspace/dbevenius/redeliver
___________________________________________________________________
Name: svnmerge-integrated
- /labs/jbossesb/trunk:1-16037
+ /labs/jbossesb/trunk:1-16066
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/build-distr.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/build-distr.xml 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/build-distr.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -132,6 +132,7 @@
<fileset dir="${installation.files.dir}/conf">
<include name="jbossesb-properties.xml"/>
<include name="esb.juddi.properties"/>
+ <include name="actionArtifactMap.properties"/>
</fileset>
<fileset dir="${installation.files.dir}/jUDDI-registry">
<include name="juddi-ds.xml"/>
Copied: labs/jbossesb/workspace/dbevenius/redeliver/product/install/conf/actionArtifactMap.properties (from rev 16065, labs/jbossesb/trunk/product/install/conf/actionArtifactMap.properties)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/install/conf/actionArtifactMap.properties (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/install/conf/actionArtifactMap.properties 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,52 @@
+#
+# The following actions are included in jbossesb.sar and require
+# no additional dependencies
+#
+# org.jboss.soa.esb.actions.converters.XStreamToObject
+# org.jboss.soa.esb.actions.routing.JMSRouter
+# org.jboss.soa.esb.actions.Aggregator
+# org.jboss.soa.esb.actions.converters.ByteArrayToString
+# org.jboss.soa.esb.actions.routing.EchoRouter
+# org.jboss.soa.esb.actions.naming.FileNameGeneratorAction
+# org.jboss.soa.esb.actions.routing.HttpRouter
+# org.jboss.soa.esb.actions.converters.ObjectInvoke
+# org.jboss.soa.esb.actions.converters.ObjectToCSVString
+# org.jboss.soa.esb.actions.converters.ObjectToXStream
+# org.jboss.soa.esb.actions.StaticWiretap
+# org.jboss.soa.esb.actions.StaticRouter
+# org.jboss.soa.esb.actions.StoreMessageToFile
+# org.jboss.soa.esb.actions.templating.StringTemplateProcessor
+# org.jboss.soa.esb.actions.SystemPrintln
+# org.jboss.soa.esb.actions.Notifier
+# org.jboss.soa.esb.listeners.message.BeanConfigActionProcessor
+# org.jboss.soa.esb.actions.scripting.GroovyActionProcessor
+#
+# The following actions are included in jbossesb.esb and require
+# no additional dependencies
+#
+# org.jboss.soa.esb.actions.MessagePersister
+# org.jboss.soa.esb.actions.MessageRedeliverer
+# org.jboss.soa.esb.monitoring.client.DataCollectorAction
+# org.jboss.soa.esb.monitoring.client.InvokerAction
+# org.jboss.soa.esb.monitoring.client.OperationsCollectorAction
+
+# jbrules.esb actions
+org.jboss.soa.esb.actions.ContentBasedWiretap=jbrules.esb
+org.jboss.soa.esb.actions.ContentBasedRouter=jbrules.esb
+org.jboss.soa.esb.actions.BusinessRulesProcessor=jbrules.esb
+org.jboss.soa.esb.actions.MessageFilter=jbrules.esb
+
+# soap.esb actions
+org.jboss.soa.esb.actions.soap.SOAPClient=soap.esb
+org.jboss.soa.esb.actions.soap.SOAPProcessor=soap.esb
+
+# jbpm.esb actions
+org.jboss.soa.esb.services.jbpm.actions.BpmProcessor=jbpm.esb
+org.jboss.soa.esb.services.jbpm.actions.CommandInterpreter=jbpm.esb
+
+# smooks.esb actions
+org.jboss.soa.esb.actions.converters.SmooksTransformer=smooks.esb
+
+# management.esb actions
+org.jboss.soa.esb.monitoring.server.DataFilerAction=management.esb
+org.jboss.soa.esb.monitoring.server.FilerAction=management.esb
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/lib/ext/juddi-1.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/addressing/helpers/EPRHelper.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -21,35 +21,26 @@
* @author mark.little at jboss.com
*/
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.StringWriter;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
+import com.sun.org.apache.xml.internal.serialize.OutputFormat;
+import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
import org.jboss.internal.soa.esb.assertion.AssertArgument;
import org.jboss.soa.esb.MarshalException;
import org.jboss.soa.esb.UnmarshalException;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.XMLUtil;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-import org.jboss.soa.esb.addressing.eprs.HibernateEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.addressing.eprs.*;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
-import com.sun.org.apache.xml.internal.serialize.OutputFormat;
-import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
public class EPRHelper
{
@@ -312,8 +303,11 @@
eprType = FTPEpr.type().toString();
else if (epr instanceof FileEpr)
eprType = FileEpr.type().toString();
+ else if (epr instanceof LogicalEPR) {
+ eprType = LogicalEPR.type().toString();
+ }
- if (eprType != null)
+ if (eprType != null)
{
if (epr.getAddr().getExtensionValue(EPR_TYPE) == null) {
epr.getAddr().addExtension(EPR_TYPE, eprType);
@@ -347,6 +341,8 @@
return new FTPEpr(epr);
else if (eprType.equals(FileEpr.type().toString()))
return new FileEpr(epr);
+ else if (eprType.equals(LogicalEPR.type().toString()))
+ return new LogicalEPR(epr.getAddr());
else
return epr;
} else {
@@ -405,6 +401,8 @@
return new FTPEpr(epr, header);
else if (eprType.equals(FileEpr.type().toString()))
return new FileEpr(epr, header);
+ else if (eprType.equals(LogicalEPR.type().toString()))
+ return new LogicalEPR(epr.getAddr());
else
return epr;
} else {
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/internal/soa/esb/assertion/AssertArgument.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -32,18 +32,19 @@
*/
public abstract class AssertArgument {
- /**
- * Assert that the argument is not null.
- * @param arg Argument.
- * @param argName Argument name.
- * @throws IllegalArgumentException Argument is null.
- */
- public static void isNotNull(Object arg, String argName) throws IllegalArgumentException {
- if (arg == null) {
- throw new IllegalArgumentException("null '" + argName
- + "' arg in method call.");
- }
- }
+ /**
+ * Assert that the argument is not null.
+ * @param arg Argument.
+ * @param argName Argument name.
+ * @throws IllegalArgumentException Argument is null.
+ */
+ public static Object isNotNull(Object arg, String argName) throws IllegalArgumentException {
+ if (arg == null) {
+ throw new IllegalArgumentException("null '" + argName
+ + "' arg in method call.");
+ }
+ return arg;
+ }
/**
* Assert that the argument is not empty.
@@ -51,12 +52,13 @@
* @param argName Argument name.
* @throws IllegalArgumentException Argument is not null, but is empty.
*/
- public static void isNotEmpty(String arg, String argName) throws IllegalArgumentException {
+ public static String isNotEmpty(String arg, String argName) throws IllegalArgumentException {
if (arg != null && arg.trim().equals("")) {
throw new IllegalArgumentException("Not null, but empty '"
+ argName + "' arg in method call.");
}
- }
+ return arg;
+ }
/**
* Assert that the argument is neither null nor empty.
@@ -64,11 +66,12 @@
* @param argName Argument name.
* @throws IllegalArgumentException Argument is null or empty.
*/
- public static void isNotNullAndNotEmpty(String arg, String argName) throws IllegalArgumentException {
+ public static String isNotNullAndNotEmpty(String arg, String argName) throws IllegalArgumentException {
if (arg == null || arg.trim().equals("")) {
throw new IllegalArgumentException("null or empty '" + argName
+ "' arg in method call.");
}
+ return arg;
}
/**
@@ -77,11 +80,12 @@
* @param argName Argument name.
* @throws IllegalArgumentException Argument is null or empty.
*/
- public static void isNotNullAndNotEmpty(Collection arg, String argName) throws IllegalArgumentException {
+ public static Collection isNotNullAndNotEmpty(Collection arg, String argName) throws IllegalArgumentException {
if (arg == null || arg.isEmpty()) {
throw new IllegalArgumentException("null or empty '" + argName
+ "' arg in method call.");
}
+ return arg;
}
/**
@@ -90,11 +94,12 @@
* @param argName Argument name.
* @throws IllegalArgumentException Argument is null or empty.
*/
- public static void isNotNullAndNotEmpty(Object[] arg, String argName) throws IllegalArgumentException {
+ public static Object[] isNotNullAndNotEmpty(Object[] arg, String argName) throws IllegalArgumentException {
if (arg == null || arg.length == 0) {
throw new IllegalArgumentException("null or empty '" + argName
+ "' arg in method call.");
}
+ return arg;
}
/**
@@ -103,10 +108,11 @@
* @param argName Argument name.
* @throws IllegalArgumentException Argument is null or empty.
*/
- public static void isNotNullAndNotEmpty(Map arg, String argName) throws IllegalArgumentException {
+ public static Map isNotNullAndNotEmpty(Map arg, String argName) throws IllegalArgumentException {
if (arg == null || arg.isEmpty()) {
throw new IllegalArgumentException("null or empty '" + argName
+ "' arg in method call.");
}
+ return arg;
}
}
Copied: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java (from rev 16065, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/addressing/eprs/LogicalEPR.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.addressing.eprs;
+
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.soa.esb.Service;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.client.ServiceInvoker;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+/**
+ * Logical EPR.
+ * <p/>
+ * Logical EPRs allow services to be addressed by their "logical" (Vs physical)
+ * name.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class LogicalEPR extends EPR {
+
+ private static final String PROTOCOL = "logical";
+ private ServiceInvoker serviceInvoker;
+
+ public LogicalEPR() {
+ super();
+ }
+
+ public LogicalEPR(PortReference addr) {
+ this(URI.create(((PortReference)AssertArgument.isNotNull(addr, "addr")).getAddress()));
+ }
+
+ public LogicalEPR(URI uri) {
+ super((URI)AssertArgument.isNotNull(uri, "uri"));
+ assertValidLogicalURI(uri);
+ }
+
+ public LogicalEPR(String serviceCategory, String serviceName) {
+ super(toLogicalURI(serviceCategory, serviceName));
+ }
+
+ public void setAddr(PortReference addr) {
+ AssertArgument.isNotNull(addr, "addr");
+ assertValidLogicalURI(URI.create(addr.getAddress()));
+ super.setAddr(addr);
+ }
+
+ public Service toService() {
+ PortReference portRef = getAddr();
+
+ if(portRef == null) {
+ throw new IllegalStateException("Invalid Logical EPR state. No PortReference set on EPR.");
+ }
+
+ URI uri;
+ try {
+ uri = new URI(portRef.getAddress());
+ } catch (URISyntaxException e) {
+ throw new IllegalStateException("Invalid Logical EPR state. '" + portRef.getAddress() + "' is not a valid URI.", e);
+ }
+
+ assertValidLogicalURI(uri);
+
+ return new Service(uri.getSchemeSpecificPart(), uri.getFragment());
+ }
+
+ public ServiceInvoker getServiceInvoker() throws MessageDeliverException {
+ if(serviceInvoker == null) {
+ serviceInvoker = new ServiceInvoker(toService());
+ }
+ return serviceInvoker;
+ }
+
+ private static URI toLogicalURI(String serviceCategory, String serviceName) {
+ AssertArgument.isNotNullAndNotEmpty(serviceCategory, "serviceCategory");
+ AssertArgument.isNotNullAndNotEmpty(serviceName, "serviceName");
+
+ try {
+ // Using this URI constructor because it encodes the
+ // scheme specific part and fragment - the cat and name
+ // may have illegal URI characters...
+ return new URI(PROTOCOL, serviceCategory, serviceName);
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+
+ private void assertValidLogicalURI(URI uri) {
+ if(!PROTOCOL.equalsIgnoreCase(uri.getScheme())) {
+ throw new IllegalArgumentException("'" + uri + "' is not a valid URI for a Logical EPR - URI scheme must be '" + PROTOCOL + "'.");
+ }
+ if(!uri.isOpaque()) {
+ throw new IllegalArgumentException("'" + uri + "' is not a valid URI for a Logical EPR - URI must be opaque.");
+ }
+
+ String category = uri.getSchemeSpecificPart();
+ String name = uri.getFragment();
+
+ if(category == null) {
+ throw new IllegalArgumentException("'" + uri + "' is not a valid URI for a Logical EPR - no URI scheme specific part (service category).");
+ }
+ if(name == null) {
+ throw new IllegalArgumentException("'" + uri + "' is not a valid URI for a Logical EPR - no URI fragment (service name) part.");
+ }
+ }
+
+ public static URI type() {
+ return _type;
+ }
+
+ private static URI _type;
+
+ static {
+ try {
+ _type = new URI("urn:jboss/esb/epr/type/logical");
+ }
+ catch (Exception ex) {
+ ex.printStackTrace();
+
+ throw new ExceptionInInitializerError(ex.toString());
+ }
+ }
+
+}
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployer.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -23,11 +23,19 @@
import java.io.File;
import java.io.InputStream;
+import java.io.StringReader;
import java.net.URL;
-import java.util.ArrayList;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
@@ -40,8 +48,13 @@
import org.jboss.mx.util.MBeanProxyExt;
import org.jboss.mx.util.ObjectNameConverter;
import org.jboss.soa.esb.lifecycle.LifecycleResourceManager;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.util.XPathNamespaceContext;
import org.jboss.system.ServiceControllerMBean;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
/**
* comment
@@ -55,9 +68,10 @@
private final static Logger log = Logger.getLogger(JBoss4ESBDeployer.class);
private ServiceControllerMBean serviceController;
+ private Properties actionArtifactProperties;
private static final String PREFIX_CANONICAL_NAME = "jboss.esb:deployment=" ;
- private static final String ESB_CANONICAL_NAME = PREFIX_CANONICAL_NAME + "jbossesb.esb" ;
+ private static final String ESB_ARTIFACT_NAME = "jbossesb.esb" ;
/**
* Default CTOR used to set default values to the Suffixes and RelativeOrder
@@ -118,6 +132,19 @@
*/
protected void startService() throws Exception
{
+ final InputStream actionArtifactIS = ClassUtil.getResourceAsStream("/actionArtifactMap.properties", getClass()) ;
+ if (actionArtifactIS == null)
+ {
+ log.debug("No action artifact mapping") ;
+ }
+ else
+ {
+ log.debug("Loading action artifact mapping") ;
+ final Properties properties = new Properties() ;
+ properties.load(actionArtifactIS) ;
+ actionArtifactProperties = properties ;
+ }
+
serviceController = (ServiceControllerMBean)
MBeanProxyExt.create(ServiceControllerMBean.class,
ServiceControllerMBean.OBJECT_NAME, server);
@@ -216,9 +243,8 @@
}
try
{
- ArrayList<ObjectName> deps = new ArrayList<ObjectName>();
+ Set<ObjectName> deps = new HashSet<ObjectName>();
InputStream in = di.localCl.getResourceAsStream("META-INF/deployment.xml");
- boolean includesESB = false ;
if (in != null)
{
try
@@ -233,10 +259,6 @@
{
Element depend = (Element)depends.next();
ObjectName depOn = new ObjectName(MetaData.getElementContent(depend));
- if (!includesESB && ESB_CANONICAL_NAME.equals(depOn.getCanonicalName()))
- {
- includesESB = true ;
- }
deps.add(depOn);
}
}
@@ -251,15 +273,13 @@
InputStream inputStream = document.openStream();
String jbossEsbXml = Configuration.getStringFromStream(inputStream);
inputStream.close();
+
+ addActionDependencies(di.shortName, jbossEsbXml, deps) ;
+
JBoss4ESBDeployment deployment = new JBoss4ESBDeployment(jbossEsbXml, di.shortName);
deployment.setClassloader(di.ucl);
String name = PREFIX_CANONICAL_NAME + di.shortName;
ObjectName on = ObjectNameConverter.convert(name);
- if (!includesESB && !ESB_CANONICAL_NAME.equals(on.getCanonicalName()))
- {
- final ObjectName esbOn = new ObjectName(ESB_CANONICAL_NAME) ;
- deps.add(esbOn) ;
- }
// Check that the name is not registered
if (server.isRegistered(on) == true)
{
@@ -282,6 +302,71 @@
super.create(di);
}
+ private void addActionDependencies(final String deploymentName,
+ final String configuration, final Set<ObjectName> deps)
+ throws XPathExpressionException, DeploymentException, MalformedObjectNameException
+ {
+ final XmlFileLoader xfl = new XmlFileLoader() ;
+ final StringReader sr = new StringReader(configuration) ;
+ final InputSource is = new InputSource(sr) ;
+ final Element rootElement = xfl.getDocument(is, "META-INF/jboss-esb.xml").getDocumentElement() ;
+
+ final Set<String> artifacts = new HashSet<String>() ;
+ artifacts.add(ESB_ARTIFACT_NAME) ;
+
+ final String namespaceURI = "http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" ;
+
+ final XPath xpathEvaluater = XPathFactory.newInstance().newXPath();
+ final XPathNamespaceContext namespaceContext = new XPathNamespaceContext() ;
+ namespaceContext.setMapping("jbesb", namespaceURI) ;
+ xpathEvaluater.setNamespaceContext(namespaceContext) ;
+
+ final NodeList actionList = (NodeList) xpathEvaluater.evaluate("/jbesb:jbossesb/jbesb:services/jbesb:service/jbesb:actions/jbesb:action",
+ rootElement, XPathConstants.NODESET) ;
+ final int numActions = actionList.getLength() ;
+ if (numActions > 0)
+ {
+ final Set<String> actionClasses = new HashSet<String>() ;
+ for(int count = 0 ; count < numActions ; count++)
+ {
+ final Node actionNode = actionList.item(count) ;
+ if (!(actionNode instanceof Element))
+ {
+ log.warn("Action node is not an element: " + actionNode) ;
+ }
+ else
+ {
+ final Element actionElement = (Element)actionNode ;
+ final String actionClass = actionElement.getAttribute("class") ;
+ actionClasses.add(actionClass) ;
+ }
+ }
+
+ final int numActionClasses = actionClasses.size() ;
+ if (numActionClasses > 0)
+ {
+ for(final String actionClass: actionClasses)
+ {
+ final String artifact = (String)actionArtifactProperties.get(actionClass) ;
+ if (artifact != null)
+ {
+ artifacts.add(artifact) ;
+ }
+ }
+ }
+ }
+
+ for(final String artifact: artifacts)
+ {
+ if (!deploymentName.equals(artifact))
+ {
+ final String canonicalName = PREFIX_CANONICAL_NAME + artifact ;
+ final ObjectName on = ObjectNameConverter.convert(canonicalName) ;
+ deps.add(on) ;
+ }
+ }
+ }
+
public synchronized void start(DeploymentInfo di)
throws DeploymentException
{
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipeline.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -22,9 +22,6 @@
package org.jboss.soa.esb.listeners.message;
-import java.util.ArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
import org.apache.log4j.Logger;
import org.jboss.soa.esb.ConfigurationException;
import org.jboss.soa.esb.actions.ActionLifecycle;
@@ -34,8 +31,10 @@
import org.jboss.soa.esb.addressing.Call;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.MalformedEPRException;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
import org.jboss.soa.esb.addressing.util.DefaultFaultTo;
import org.jboss.soa.esb.addressing.util.DefaultReplyTo;
+import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierException;
import org.jboss.soa.esb.couriers.CourierFactory;
@@ -44,8 +43,12 @@
import org.jboss.soa.esb.listeners.ListenerTagNames;
import org.jboss.soa.esb.listeners.message.errors.Factory;
import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageType;
import org.jboss.soa.esb.util.ClassUtil;
+import java.util.ArrayList;
+import java.util.concurrent.atomic.AtomicBoolean;
+
/**
* Action Processing Pipeline. <p/> Runs a list of action classes on a message
*
@@ -368,7 +371,7 @@
return transactional ;
}
- /**
+ /**
* Send the reply.
*
* @param fromAddress
@@ -381,53 +384,28 @@
private void replyTo(EPR fromAddress, EPR replyToAddress, Message message)
{
- Courier courier = null;
EPR replyToEPR = DefaultReplyTo.getReplyToAddress(message);
- if (replyToEPR != null)
- replyToAddress = replyToEPR;
+ if (replyToEPR != null) {
+ replyToAddress = replyToEPR;
+ }
- if (replyToAddress == null)
+ if (replyToAddress == null)
{
- LOGGER.warn("No reply to address defined for reply message! "+message.getHeader());
- }
+ LOGGER.warn("No reply to address defined for reply message! "+message.getHeader());
+ }
else
{
- final Call call = message.getHeader().getCall() ;
- call.setFrom(fromAddress) ;
- call.setReplyTo(null) ;
- call.setFaultTo(null) ;
- try
- {
- courier = CourierFactory.getCourier(replyToAddress);
- courier.deliver(message);
- }
- catch (final CourierException e)
- {
- LOGGER.error("Failed to reply to address " + replyToAddress + " for message "+message.getHeader(),
- e);
- }
- catch (final MalformedEPRException e)
- {
- LOGGER.error("Failed to reply to address " + replyToAddress + " for message "+message.getHeader(),
- e);
- }
- catch (final Throwable e)
- {
- LOGGER.error("Failed to reply to address " + replyToAddress + " for message "+message.getHeader(),
- e);
- }
- finally
- {
- if (courier != null)
- {
- CourierUtil.cleanCourier(courier);
- }
- }
+ final Call call = message.getHeader().getCall() ;
+ call.setFrom(fromAddress) ;
+ call.setReplyTo(null) ;
+ call.setFaultTo(null) ;
+
+ messageTo(replyToAddress, message, MessageType.reply);
}
}
- /**
+ /**
* Send the fault message to the EPR.
*
* @param fromAddress
@@ -440,53 +418,65 @@
private void faultTo(EPR fromAddress, EPR faultToAddress, Message message)
{
- Courier courier = null;
EPR faultToEPR = DefaultFaultTo.getFaultToAddress(message);
- if (faultToEPR != null)
- faultToAddress = faultToEPR;
+ if (faultToEPR != null) {
+ faultToAddress = faultToEPR;
+ }
- if (faultToAddress == null)
+ if (faultToAddress == null)
{
- LOGGER.warn("No fault address defined for fault message! "+message.getHeader());
- }
+ LOGGER.warn("No fault address defined for fault message! "+message.getHeader());
+ }
else
{
- final Call call = message.getHeader().getCall() ;
- call.setFrom(fromAddress) ;
- call.setReplyTo(null) ;
- call.setFaultTo(null) ;
- try
- {
- courier = CourierFactory.getCourier(faultToAddress);
- courier.deliver(message);
- }
- catch (final CourierException e)
- {
- LOGGER.error("Failed to send error to address " + faultToAddress
- + " for message "+message.getHeader(), e);
- }
- catch (final MalformedEPRException e)
- {
- LOGGER.error("Failed to send error to address " + faultToAddress
- + " for message "+message.getHeader(), e);
- }
- catch (final Throwable e)
- {
- LOGGER.error("Failed to send error to address " + faultToAddress
- + " for message "+message.getHeader(), e);
- }
- finally
- {
- if (courier != null)
- {
- CourierUtil.cleanCourier(courier);
- }
- }
- }
+ final Call call = message.getHeader().getCall() ;
+ call.setFrom(fromAddress) ;
+ call.setReplyTo(null) ;
+ call.setFaultTo(null) ;
+
+ messageTo(faultToAddress, message, MessageType.fault);
+ }
}
- /**
+ private static enum MessageType {
+ reply,
+ fault,
+ }
+
+ private void messageTo(EPR epr, Message message, MessageType messageType) {
+ if(epr instanceof LogicalEPR) {
+ try {
+ ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
+ invoker.deliverAsync(message);
+ } catch (MessageDeliverException e) {
+ LOGGER.error("Failed to send " + messageType + " to address " + epr
+ + " for message "+message.getHeader(), e);
+ }
+ } else {
+ Courier courier = null;
+
+ try {
+ courier = CourierFactory.getCourier(epr);
+ courier.deliver(message);
+ } catch (final CourierException e) {
+ LOGGER.error("Failed to send " + messageType + " to address " + epr
+ + " for message " + message.getHeader(), e);
+ } catch (final MalformedEPRException e) {
+ LOGGER.error("Failed to send " + messageType + " to address " + epr
+ + " for message " + message.getHeader(), e);
+ } catch (final Throwable e) {
+ LOGGER.error("Failed to send " + messageType + " to address " + epr
+ + " for message " + message.getHeader(), e);
+ } finally {
+ if (courier != null) {
+ CourierUtil.cleanCourier(courier);
+ }
+ }
+ }
+ }
+
+ /**
* Handle the destruction of the pipeline from the specified position.
*
* @param initialPosition
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounter.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -40,7 +40,6 @@
private int failedMessageCount;
private int successMessageCount;
private long totalProcessTime;
- private long totalBytes;
/**
* Constructor.
@@ -110,13 +109,6 @@
}
totalProcessTime += msb.getProcessTime();
-
- Object payload = msb.getMessage().getBody().get();
- if(payload instanceof byte[]) {
- totalBytes += ((byte[])payload).length;
- } else {
- // ???? http://jira.jboss.com/jira/browse/JBESB-1183
- }
}
/**
@@ -131,18 +123,6 @@
return null;
}
}
-
- /**
- * Get the average bytes of the processed messages.
- * @return average bytes of the messages processed
- */
- public long getAverageSuccessBytes() {
- if ((successMessageCount) > 0 ) {
- return (totalBytes / (successMessageCount));
- } else {
- return 0;
- }
- }
/**
* Reset the counts - this resets the totals and the last message time.
@@ -153,6 +133,5 @@
successMessageCount = 0;
failedMessageCount = 0;
totalProcessTime = 0;
- totalBytes = 0;
}
}
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/listeners/message/MessageCounterMBean.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -41,8 +41,6 @@
public String getLastFailedMessageDate();
public Double getAverageSuccessTime();
-
- public long getAverageSuccessBytes();
-
+
public void resetCounts();
}
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/mock/MockAction.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/mock/MockAction.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/mock/MockAction.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -32,12 +32,20 @@
public class MockAction extends AbstractActionPipelineProcessor {
public static Message message;
+ public static ActionProcessingException exception;
public MockAction(ConfigTree config) {
}
public Message process(final Message message) throws ActionProcessingException {
MockAction.message = message;
+
+ if(exception != null) {
+ ActionProcessingException e = exception;
+ exception = null;
+ throw e;
+ }
+
return message;
}
}
Copied: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/util/XPathNamespaceContext.java (from rev 16065, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/util/XPathNamespaceContext.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/util/XPathNamespaceContext.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/src/org/jboss/soa/esb/util/XPathNamespaceContext.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, 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.soa.esb.util;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.xml.namespace.NamespaceContext;
+
+/**
+ * A simple namespace context used for XPath expression evaluation.
+ *
+ * @author <a href='mailto:kevin.conner at jboss.com'>Kevin Conner</a>
+ */
+public class XPathNamespaceContext implements NamespaceContext
+{
+ /**
+ * The prefix to URI mapping.
+ */
+ private final HashMap<String, String> prefixToURI = new HashMap<String, String>() ;
+ /**
+ * The URI to prefix mapping.
+ */
+ private final HashMap<String, String> uriToPrefix = new HashMap<String, String>() ;
+
+ /**
+ * Get the namespace URI for the specified prefix.
+ * @param The prefix.
+ * @return The associated namespace URI.
+ */
+ public String getNamespaceURI(final String prefix)
+ {
+ return prefixToURI.get(prefix) ;
+ }
+
+ /**
+ * Get the prefix for the specified namespace URI.
+ * @param The namespace URI.
+ * @return The associated prefix.
+ */
+ public String getPrefix(final String namespaceURI)
+ {
+ return uriToPrefix.get(namespaceURI) ;
+ }
+
+ /**
+ * Get the prefixes for the specified namespace URI.
+ * @param The namespace URI.
+ * @return The iterator of the associated prefixes.
+ */
+ public Iterator<?> getPrefixes(String namespaceURI)
+ {
+ final String prefix = getPrefix(namespaceURI) ;
+ if (prefix == null)
+ {
+ return Collections.EMPTY_SET.iterator() ;
+ }
+ else
+ {
+ return Arrays.asList(prefix).iterator() ;
+ }
+ }
+
+ /**
+ * Initialise the prefix/namespace URI mapping.
+ * @param prefix The prefix.
+ * @param uri The namespace URI.
+ */
+ public void setMapping(final String prefix, final String uri)
+ {
+ prefixToURI.put(prefix, uri) ;
+ uriToPrefix.put(uri, prefix) ;
+ }
+}
Copied: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/LogicalEPRUnitTest.java (from rev 16065, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/LogicalEPRUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/LogicalEPRUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/addressing/eprs/LogicalEPRUnitTest.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,199 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.addressing.eprs;
+
+import junit.framework.TestCase;
+import org.jboss.internal.soa.esb.couriers.MockCourier;
+import org.jboss.internal.soa.esb.couriers.MockCourierFactory;
+import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
+import org.jboss.internal.soa.esb.services.registry.MockRegistry;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.ActionProcessingPipeline;
+import org.jboss.soa.esb.listeners.message.ActionProcessingPipelineUnitTest;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.message.format.MessageType;
+import org.jboss.soa.esb.message.tests.XMLMessageUnitTest;
+import org.jboss.soa.esb.mock.MockAction;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+
+import java.net.URI;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class LogicalEPRUnitTest extends TestCase {
+
+ public void test_valid_uri() {
+ LogicalEPR epr;
+
+ epr = new LogicalEPR("a", "b");
+ assertEquals("logical:a#b", epr.getAddr().getAddress());
+ assertEquals("a", epr.toService().getCategory());
+ assertEquals("b", epr.toService().getName());
+
+ // Make sure the parts are properly encoded/decoded - cat and name with spaces, slashes etc...
+ epr = new LogicalEPR("My / Category", "My / Name");
+ assertEquals("logical:My%20/%20Category#My%20/%20Name", epr.getAddr().getAddress());
+ assertEquals("My / Category", epr.toService().getCategory());
+ assertEquals("My / Name", epr.toService().getName());
+
+ epr = new LogicalEPR(URI.create("logical:My%20/%20Category#My%20/%20Name"));
+ assertEquals("logical:My%20/%20Category#My%20/%20Name", epr.getAddr().getAddress());
+ assertEquals("My / Category", epr.toService().getCategory());
+ assertEquals("My / Name", epr.toService().getName());
+
+ epr = new LogicalEPR(new PortReference("logical:My%20/%20Category#My%20/%20Name"));
+ assertEquals("logical:My%20/%20Category#My%20/%20Name", epr.getAddr().getAddress());
+ assertEquals("My / Category", epr.toService().getCategory());
+ assertEquals("My / Name", epr.toService().getName());
+
+ epr = new LogicalEPR();
+ epr.setAddr(new PortReference("logical:My%20/%20Category#My%20/%20Name"));
+ assertEquals("logical:My%20/%20Category#My%20/%20Name", epr.getAddr().getAddress());
+ assertEquals("My / Category", epr.toService().getCategory());
+ assertEquals("My / Name", epr.toService().getName());
+
+ epr = new LogicalEPR("1234567890 -=`!\"£$%^&*()_+\\|,./;'#[]<>?:@~{}", "1234567890 -=`!\"£$%^&*()_+\\|,./;'#[]<>?:@~{}");
+ assertEquals("logical:1234567890%20-=%60!%22£$%25%5E&*()_+%5C%7C,./;'%23[]%3C%3E?:@~%7B%7D#1234567890%20-=%60!%22£$%25%5E&*()_+%5C%7C,./;'%23[]%3C%3E?:@~%7B%7D", epr.getAddr().getAddress());
+ assertEquals("1234567890 -=`!\"£$%^&*()_+\\|,./;'#[]<>?:@~{}", epr.toService().getCategory());
+ assertEquals("1234567890 -=`!\"£$%^&*()_+\\|,./;'#[]<>?:@~{}", epr.toService().getName());
+
+ }
+
+ public void test_invalid_uri() {
+ try {
+ new LogicalEPR(URI.create("xxxx:a#b"));
+ fail("Expected IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ assertEquals("'xxxx:a#b' is not a valid URI for a Logical EPR - URI scheme must be 'logical'.", e.getMessage());
+ }
+
+ try {
+ new LogicalEPR(new PortReference("logical://a#b"));
+ fail("Expected IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ assertEquals("'logical://a#b' is not a valid URI for a Logical EPR - URI must be opaque.", e.getMessage());
+ }
+
+ try {
+ LogicalEPR epr = new LogicalEPR();
+ epr.setAddr(new PortReference("logical:a"));
+ fail("Expected IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ assertEquals("'logical:a' is not a valid URI for a Logical EPR - no URI fragment (service name) part.", e.getMessage());
+ }
+
+ try {
+ LogicalEPR epr = new LogicalEPR();
+ epr.setAddr(new PortReference("logical:#b"));
+ fail("Expected IllegalArgumentException");
+ } catch (IllegalArgumentException e) {
+ assertEquals("Expected scheme-specific part at index 8: logical:#b", e.getCause().getMessage());
+ }
+ }
+
+ public void test_Serialize_Deserialize()
+ {
+ Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
+
+ try
+ {
+ EPR epr = new LogicalEPR(new PortReference("logical:a#b"));
+
+ msg.getHeader().getCall().setTo(epr);
+
+ final String xmlRepresentation = XMLMessageUnitTest.msgToXML((MessageImpl)msg) ;
+
+ final MessageImpl nImpl = XMLMessageUnitTest.msgFromXML(xmlRepresentation) ;
+
+ EPR theEpr = nImpl.getHeader().getCall().getTo();
+
+ assertTrue("Expected a Logical EPR", theEpr instanceof LogicalEPR);
+
+ assertEquals("logical:a#b", theEpr.getAddr().getAddress());
+ }
+ catch (Exception ex)
+ {
+ fail(ex.toString());
+ }
+ }
+
+ private MockCourier courier1;
+ private MockCourier courier2;
+
+ public void setUp() throws Exception {
+ MockCourierFactory.install();
+ MockRegistry.install();
+
+ courier1 = new MockCourier(true);
+ courier2 = new MockCourier(true);
+ MockRegistry.register("cat", "servicex", courier1);
+ MockRegistry.register("cat", "servicey", courier2);
+ }
+
+ public void tearDown() throws Exception {
+ MockRegistry.uninstall();
+ MockCourierFactory.uninstall();
+ }
+
+ public void test_replyTo() throws ConfigurationException {
+ ActionProcessingPipeline pipeline = createTestPipeline();
+ Message message;
+
+ message = MessageFactory.getInstance().getMessage();
+ message.getHeader().getCall().setReplyTo(new LogicalEPR("cat", "servicex"));
+ message.getHeader().getCall().setFaultTo(new LogicalEPR("cat", "servicey"));
+ assertTrue(!courier1.deliveryAttempted);
+ assertTrue(!courier2.deliveryAttempted);
+ pipeline.process(message);
+ assertTrue(courier1.deliveryAttempted);
+ assertTrue(!courier2.deliveryAttempted);
+ }
+
+ public void test_faultTo() throws ConfigurationException {
+ ActionProcessingPipeline pipeline = createTestPipeline();
+ Message message;
+
+ message = MessageFactory.getInstance().getMessage();
+ message.getHeader().getCall().setReplyTo(new LogicalEPR("cat", "servicex"));
+ message.getHeader().getCall().setFaultTo(new LogicalEPR("cat", "servicey"));
+ assertTrue(!courier1.deliveryAttempted);
+ assertTrue(!courier2.deliveryAttempted);
+ MockAction.exception = new ActionProcessingException("blah");
+ pipeline.process(message);
+ assertTrue(!courier1.deliveryAttempted);
+ assertTrue(courier2.deliveryAttempted);
+ }
+
+ private ActionProcessingPipeline createTestPipeline() throws ConfigurationException {
+ ConfigTree pipelineConfig = new ConfigTree("pipline");
+
+ ActionProcessingPipelineUnitTest.addAction(pipelineConfig, MockAction.class.getName());
+
+ ActionProcessingPipeline pipeline = new ActionProcessingPipeline(pipelineConfig);
+ pipeline.initialise();
+
+ return pipeline;
+ }
+}
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -379,8 +379,11 @@
}
}
-
- private void addAction(final ConfigTree configTree, final String actionName,
+
+ public static void addAction(final ConfigTree configTree, final String actionName) {
+ addAction(configTree, actionName, null, null, null);
+ }
+ public static void addAction(final ConfigTree configTree, final String actionName,
final String processOverride, final String successOverride,
final String exceptionOverride)
{
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/rosetta/tests/src/org/jboss/soa/esb/message/tests/XMLMessageUnitTest.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -35,13 +35,8 @@
import org.jboss.internal.soa.esb.message.format.xml.MessageImpl;
import org.jboss.soa.esb.addressing.Call;
import org.jboss.soa.esb.addressing.EPR;
-import org.jboss.soa.esb.addressing.eprs.EmailEpr;
-import org.jboss.soa.esb.addressing.eprs.FTPEpr;
-import org.jboss.soa.esb.addressing.eprs.FileEpr;
-import org.jboss.soa.esb.addressing.eprs.HTTPEpr;
-import org.jboss.soa.esb.addressing.eprs.JDBCEpr;
-import org.jboss.soa.esb.addressing.eprs.JMSEpr;
-import org.jboss.soa.esb.addressing.eprs.SFTPEpr;
+import org.jboss.soa.esb.addressing.PortReference;
+import org.jboss.soa.esb.addressing.eprs.*;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.body.content.BytesBody;
import org.jboss.soa.esb.message.format.MessageFactory;
@@ -410,7 +405,7 @@
fail(ex.toString());
}
}
-
+
public void testEmailEPRType ()
{
Message msg = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
@@ -552,7 +547,7 @@
}
}
- private String msgToXML(final MessageImpl msg)
+ public static String msgToXML(final MessageImpl msg)
throws Exception
{
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
@@ -576,7 +571,7 @@
return sWriter.toString() ;
}
- private MessageImpl msgFromXML(final String xmlRepresentation)
+ public static MessageImpl msgFromXML(final String xmlRepresentation)
throws Exception
{
final StringReader stringReader = new StringReader(xmlRepresentation) ;
Modified: labs/jbossesb/workspace/dbevenius/redeliver/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/product/services/jbpm/src/main/java/org/jboss/soa/esb/services/jbpm/actions/CommandInterpreter.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -26,13 +26,8 @@
import org.jboss.soa.esb.actions.ActionLifecycle;
import org.jboss.soa.esb.actions.ActionLifecycleException;
import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.addressing.MalformedEPRException;
-import org.jboss.soa.esb.addressing.util.DefaultReplyTo;
-import org.jboss.soa.esb.couriers.Courier;
import org.jboss.soa.esb.couriers.CourierException;
-import org.jboss.soa.esb.couriers.CourierFactory;
-import org.jboss.soa.esb.couriers.CourierUtil;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Body;
import org.jboss.soa.esb.message.Message;
@@ -64,7 +59,6 @@
}
- private CommandInterpreter() {}
public CommandInterpreter(ConfigTree config) throws ConfigurationException
{
_config = config;
@@ -85,50 +79,9 @@
throw new ActionProcessingException(e.getMessage(), e);
}
- return replyMessage(message,response);
+ return response;
} //________________________________
-
- /**
- * @param message - Containing payload and replyToEpr where to send the reply.
- * @throws Exception
- */
- public static Message defaultReply(Message message)
- throws MalformedEPRException,CourierException
- {
- EPR reply = DefaultReplyTo.getReplyToAddress(message);
-
- if (null==reply)
- _logger.error("Null replyToEPR in message - response will not be sent to invoker");
- else
- {
- Courier courier = CourierFactory.getCourier(reply);
- try
- {
- courier.deliver(message);
- }
- finally
- {
- CourierUtil.cleanCourier(courier) ;
- }
- }
- return message;
- } // ________________________________
-
- public static Message replyMessage(Message input, Message output)
- throws CourierException, MalformedEPRException
- {
- EPR toEpr = input.getHeader().getCall().getTo();
- if (null!=toEpr)
- output.getHeader().getCall().setTo(toEpr);
- EPR replyTo = input.getHeader().getCall().getReplyTo();
- if (null!=replyTo)
- output.getHeader().getCall().setReplyTo (replyTo);
- EPR faultTo = input.getHeader().getCall().getFaultTo();
- if (null!=faultTo)
- output.getHeader().getCall().setFaultTo (faultTo);
- return (null==replyTo)? output : defaultReply(output);
- } //________________________________
-
+
public static Message doTheJob(Command command) throws JbpmException
{
Message response = Helper.commandMessageTemplate();
Modified: labs/jbossesb/workspace/dbevenius/redeliver/qa/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/build.xml 2007-10-25 11:08:16 UTC (rev 16066)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/build.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -55,7 +55,11 @@
</condition>
<fail if="integration.qa.tests.failed" message="QA Unit Test failure"/>
</target>
-
+
+ <target name="junit" depends="esb.init" description="Run JUnit based QA tests.">
+ <ant dir="junit" target="test" />
+ </target>
+
<target name="test.junit" depends="esb.init" description="Run JUnit based QA tests.">
<ant dir="junit" target="test" />
<ant dir="quickstarts" target="all-test" />
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/TestUtils.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/TestUtils.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/TestUtils.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/TestUtils.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Helper class for tests.
+ * <p/>
+ * Just a few methods lifted from the quickstart "Helper" class.
+ */
+public class TestUtils {
+
+ /* Determine if the event file has been written */
+ public static boolean waitForFile(String fileName) throws Exception {
+ final File file = new File(fileName) ;
+
+ long startTime = System.currentTimeMillis();
+ while(System.currentTimeMillis() < startTime + 10000) {
+ if(file.exists()) {
+ return true;
+ }
+ Thread.sleep(500);
+ }
+
+ return false;
+ }
+
+ public static String getTempDir(String filename)
+ {
+ String tmpDir="";
+ if (!filename.startsWith(File.separator)) {
+ tmpDir = System.getProperty("java.io.tmpdir") + File.separator;
+ }
+ return tmpDir;
+ }
+
+ public static String getQuickstartLocation(final String location)
+ throws IOException
+ {
+ final File quickstartDir = new File(System.getProperty("org.jboss.esb.test.quickstarts.dir"), location) ;
+ return quickstartDir.getCanonicalPath() ;
+ }
+
+ public static boolean assertEquals(final String content1, final String content2, final boolean trimLines) throws IOException {
+ List<String> content1Lines = getLines(content1, trimLines);
+ List<String> content2Lines = getLines(content2, trimLines);
+
+ return content1Lines.equals(content2Lines);
+ }
+
+ private static List<String> getLines(final String string, final boolean trimLines) throws IOException {
+ BufferedReader reader = new BufferedReader(new StringReader(string));
+ List<String> lines = new ArrayList<String>();
+ String line;
+
+ while((line = reader.readLine()) != null) {
+ if(trimLines) {
+ lines.add(line.trim());
+ } else {
+ lines.add(line);
+ }
+ }
+
+ return lines;
+ }
+}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr)
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.epr;
-
-import junit.framework.Test;
-import org.jboss.soa.esb.TestUtils;
-import org.jboss.soa.esb.testutils.FileUtil;
-import org.jboss.soa.esb.testutils.JMSUtil;
-import org.jboss.soa.esb.util.DeploymentArchive;
-import org.jboss.test.JBossTestCase;
-
-import java.io.File;
-import java.io.FileInputStream;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class LogicalEPRUnitTest extends JBossTestCase {
-
- private static final String FILE_NAME = "LogicalEPRUnitTest.log";
- private static final File TEST_OUTPUT_FILE = new File(TestUtils.getTempDir(FILE_NAME) + FILE_NAME);
-
- public LogicalEPRUnitTest(String s) {
- super(s);
- }
-
- protected void setUp() throws Exception {
- TEST_OUTPUT_FILE.delete();
- }
-
- public void test_replyto() throws Exception {
- // Send the message and wait for the drop...
- JMSUtil.sendMessageToQueue("reply-To", "queue/LogicalEPRUnitTest_service1_gtw", null);
- assertTrue("Test output file '" + TEST_OUTPUT_FILE + "' not dropped.", TestUtils.waitForFile(TEST_OUTPUT_FILE.getAbsolutePath()));
-
- String actualOutput = FileUtil.readStream(new FileInputStream(TEST_OUTPUT_FILE));
- assertEquals("Reply-To Service3", actualOutput);
- }
-
- public void test_faultto() throws Exception {
- // Send the message and wait for the drop...
- JMSUtil.sendMessageToQueue("fault-To", "queue/LogicalEPRUnitTest_service1_gtw", null);
- assertTrue("Test output file '" + TEST_OUTPUT_FILE + "' not dropped.", TestUtils.waitForFile(TEST_OUTPUT_FILE.getAbsolutePath()));
-
- String actualOutput = FileUtil.readStream(new FileInputStream(TEST_OUTPUT_FILE));
- assertEquals("org.jboss.soa.esb.actions.ActionProcessingException: Service2Action fault", actualOutput);
- }
-
- public static Test suite() throws Exception {
- DeploymentArchive deployment = new DeploymentArchive("LogicalEPRUnitTest.esb");
-
- deployment.addEntry("META-INF/jboss-esb.xml", LogicalEPRUnitTest.class.getResourceAsStream("jboss-esb.xml"));
- deployment.addEntry("META-INF/deployment.xml", LogicalEPRUnitTest.class.getResourceAsStream("deployment.xml"));
- deployment.addEntry("jms-service.xml", LogicalEPRUnitTest.class.getResourceAsStream("jms-service.xml"));
- deployment.addEntry(ServiceInvokerAction.class);
- deployment.addEntry(Service2Action.class);
- deployment.addEntry(Service3Action1.class);
- deployment.addEntry(Service3Action2.class);
-
- deployment.create();
-
- return getDeploySetup(LogicalEPRUnitTest.class, "LogicalEPRUnitTest.esb");
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/LogicalEPRUnitTest.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.epr;
+
+import junit.framework.Test;
+import org.jboss.soa.esb.TestUtils;
+import org.jboss.soa.esb.testutils.FileUtil;
+import org.jboss.soa.esb.testutils.JMSUtil;
+import org.jboss.soa.esb.util.DeploymentArchive;
+import org.jboss.test.JBossTestCase;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class LogicalEPRUnitTest extends JBossTestCase {
+
+ private static final String FILE_NAME = "LogicalEPRUnitTest.log";
+ private static final File TEST_OUTPUT_FILE = new File(TestUtils.getTempDir(FILE_NAME) + FILE_NAME);
+
+ public LogicalEPRUnitTest(String s) {
+ super(s);
+ }
+
+ protected void setUp() throws Exception {
+ TEST_OUTPUT_FILE.delete();
+ }
+
+ public void test_replyto() throws Exception {
+ // Send the message and wait for the drop...
+ JMSUtil.sendMessageToQueue("reply-To", "queue/LogicalEPRUnitTest_service1_gtw", null);
+ assertTrue("Test output file '" + TEST_OUTPUT_FILE + "' not dropped.", TestUtils.waitForFile(TEST_OUTPUT_FILE.getAbsolutePath()));
+
+ String actualOutput = FileUtil.readStream(new FileInputStream(TEST_OUTPUT_FILE));
+ assertEquals("Reply-To Service3", actualOutput);
+ }
+
+ public void test_faultto() throws Exception {
+ // Send the message and wait for the drop...
+ JMSUtil.sendMessageToQueue("fault-To", "queue/LogicalEPRUnitTest_service1_gtw", null);
+ assertTrue("Test output file '" + TEST_OUTPUT_FILE + "' not dropped.", TestUtils.waitForFile(TEST_OUTPUT_FILE.getAbsolutePath()));
+
+ String actualOutput = FileUtil.readStream(new FileInputStream(TEST_OUTPUT_FILE));
+ assertEquals("org.jboss.soa.esb.actions.ActionProcessingException: Service2Action fault", actualOutput);
+ }
+
+ public static Test suite() throws Exception {
+ DeploymentArchive deployment = new DeploymentArchive("LogicalEPRUnitTest.esb");
+
+ deployment.addEntry("META-INF/jboss-esb.xml", LogicalEPRUnitTest.class.getResourceAsStream("jboss-esb.xml"));
+ deployment.addEntry("META-INF/deployment.xml", LogicalEPRUnitTest.class.getResourceAsStream("deployment.xml"));
+ deployment.addEntry("jms-service.xml", LogicalEPRUnitTest.class.getResourceAsStream("jms-service.xml"));
+ deployment.addEntry(ServiceInvokerAction.class);
+ deployment.addEntry(Service2Action.class);
+ deployment.addEntry(Service3Action1.class);
+ deployment.addEntry(Service3Action2.class);
+
+ deployment.create();
+
+ return getDeploySetup(LogicalEPRUnitTest.class, "LogicalEPRUnitTest.esb");
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.epr;
-
-import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class Service2Action extends AbstractActionPipelineProcessor {
-
- public Service2Action(ConfigTree config) throws MessageDeliverException {
- }
-
- public Message process(Message message) throws ActionProcessingException {
-
- if(message.getHeader().getCall().getFaultTo() != null) {
- message.getBody().add("Fault-To Service3");
- throw new ActionProcessingException("Service2Action fault");
- } else {
- message.getBody().add("Reply-To Service3");
- }
-
- return message;
- }
-}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service2Action.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.epr;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Service2Action extends AbstractActionPipelineProcessor {
+
+ public Service2Action(ConfigTree config) throws MessageDeliverException {
+ }
+
+ public Message process(Message message) throws ActionProcessingException {
+
+ if(message.getHeader().getCall().getFaultTo() != null) {
+ message.getBody().add("Fault-To Service3");
+ throw new ActionProcessingException("Service2Action fault");
+ } else {
+ message.getBody().add("Reply-To Service3");
+ }
+
+ return message;
+ }
+}
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.epr;
-
-import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class Service3Action1 extends AbstractActionPipelineProcessor {
-
- public Service3Action1(ConfigTree config) throws MessageDeliverException {
- }
-
- public Message process(Message message) throws ActionProcessingException {
-
- if(message.getFault().getReason() != null) {
- message.getBody().add(message.getFault().getReason());
- }
-
- return message;
- }
-}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action1.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.epr;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Service3Action1 extends AbstractActionPipelineProcessor {
+
+ public Service3Action1(ConfigTree config) throws MessageDeliverException {
+ }
+
+ public Message process(Message message) throws ActionProcessingException {
+
+ if(message.getFault().getReason() != null) {
+ message.getBody().add(message.getFault().getReason());
+ }
+
+ return message;
+ }
+}
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.epr;
-
-import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class Service3Action2 extends AbstractActionPipelineProcessor {
-
- public Service3Action2(ConfigTree config) throws MessageDeliverException {
- }
-
- public Message process(Message message) throws ActionProcessingException {
- // "Terminate" the pipeline by returning null, otherwise we might try sending
- // a reply to the caller. Nuts :-)
- return null;
- }
-}
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/Service3Action2.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.epr;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class Service3Action2 extends AbstractActionPipelineProcessor {
+
+ public Service3Action2(ConfigTree config) throws MessageDeliverException {
+ }
+
+ public Message process(Message message) throws ActionProcessingException {
+ // "Terminate" the pipeline by returning null, otherwise we might try sending
+ // a reply to the caller. Nuts :-)
+ return null;
+ }
+}
\ No newline at end of file
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * 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,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006, JBoss Inc.
- */
-package org.jboss.soa.esb.epr;
-
-import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
-import org.jboss.soa.esb.actions.ActionProcessingException;
-import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
-import org.jboss.soa.esb.client.ServiceInvoker;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.message.MessageDeliverException;
-import org.jboss.soa.esb.message.Message;
-
-/**
- * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
- */
-public class ServiceInvokerAction extends AbstractActionPipelineProcessor {
-
- private ServiceInvoker invoker;
-
- public ServiceInvokerAction(ConfigTree config) throws MessageDeliverException {
- invoker = new ServiceInvoker("MyServiceCategory", "MyService2");
- }
-
- public Message process(Message message) throws ActionProcessingException {
- String instruction = (String) message.getBody().get();
-
- if(instruction.equalsIgnoreCase("reply-To")) {
- message.getHeader().getCall().setReplyTo(new LogicalEPR("MyServiceCategory", "MyService3"));
- message.getHeader().getCall().setFaultTo(null);
- } else {
- message.getHeader().getCall().setReplyTo(null);
- message.getHeader().getCall().setFaultTo(new LogicalEPR("MyServiceCategory", "MyService3"));
- }
-
- try {
- invoker.deliverAsync(message);
- } catch (MessageDeliverException e) {
- throw new ActionProcessingException(e);
- }
-
- return message;
- }
-}
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/ServiceInvokerAction.java 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.epr;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.addressing.eprs.LogicalEPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.message.Message;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ServiceInvokerAction extends AbstractActionPipelineProcessor {
+
+ private ServiceInvoker invoker;
+
+ public ServiceInvokerAction(ConfigTree config) throws MessageDeliverException {
+ invoker = new ServiceInvoker("MyServiceCategory", "MyService2");
+ }
+
+ public Message process(Message message) throws ActionProcessingException {
+ String instruction = (String) message.getBody().get();
+
+ if(instruction.equalsIgnoreCase("reply-To")) {
+ message.getHeader().getCall().setReplyTo(new LogicalEPR("MyServiceCategory", "MyService3"));
+ message.getHeader().getCall().setFaultTo(null);
+ } else {
+ message.getHeader().getCall().setReplyTo(null);
+ message.getHeader().getCall().setFaultTo(new LogicalEPR("MyServiceCategory", "MyService3"));
+ }
+
+ try {
+ invoker.deliverAsync(message);
+ } catch (MessageDeliverException e) {
+ throw new ActionProcessingException(e);
+ }
+
+ return message;
+ }
+}
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,6 +0,0 @@
-<jbossesb-deployment>
- <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw</depends>
- <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1</depends>
- <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2</depends>
- <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3</depends>
-</jbossesb-deployment>
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/deployment.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,6 @@
+<jbossesb-deployment>
+ <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw</depends>
+ <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1</depends>
+ <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2</depends>
+ <depends>jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3</depends>
+</jbossesb-deployment>
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,76 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8"?>
-<jbossesb
- xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
- parameterReloadSecs="5">
-
- <providers>
- <jms-provider name="JMS" connection-factory="ConnectionFactory"
- jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
- jndi-URL="localhost">
-
- <jms-bus busid="service1_gtw">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service1_gtw"/>
- </jms-bus>
- <jms-bus busid="service1">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service1"/>
- </jms-bus>
- <jms-bus busid="service2">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service2"/>
- </jms-bus>
- <jms-bus busid="service3">
- <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service3"/>
- </jms-bus>
- </jms-provider>
- </providers>
-
- <services>
-
- <service category="MyServiceCategory" name="MyService1" description="Service 1">
- <listeners>
- <jms-listener name="JMS-Gateway" busidref="service1_gtw" is-gateway="true"/>
- <jms-listener name="JMS-ESBListener" busidref="service1"/>
- </listeners>
- <actions>
- <action name="invoke-service2" class="org.jboss.soa.esb.epr.ServiceInvokerAction" />
- </actions>
- </service>
-
- <service category="MyServiceCategory" name="MyService2" description="Service 2">
- <listeners>
- <jms-listener name="JMS-ESBListener" busidref="service2"/>
- </listeners>
- <actions>
- <action name="print" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="message" value="Reply/Fault going to Service 3" />
- </action>
- <action name="Service2Action" class="org.jboss.soa.esb.epr.Service2Action" />
- </actions>
- </service>
-
- <service category="MyServiceCategory" name="MyService3" description="Service 3">
- <listeners>
- <jms-listener name="JMS-ESBListener" busidref="service3"/>
- </listeners>
- <actions>
- <action name="print" class="org.jboss.soa.esb.actions.SystemPrintln">
- <property name="message" value="Reply/Fault received at Service 3" />
- </action>
-
- <action name="Service3Action1" class="org.jboss.soa.esb.epr.Service3Action1" />
-
- <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
- <property name="filename" value="LogicalEPRUnitTest.log" />
- <property name="raw" value="true"/>
- </action>
-
- <!--
- Just a noddy action to return a null message out of the pipeline
- in order to avoid an exception...
- -->
- <action name="Service3Action2" class="org.jboss.soa.esb.epr.Service3Action2" />
- </actions>
- </service>
-
- </services>
-
-</jbossesb>
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jboss-esb.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,76 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+ xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+ parameterReloadSecs="5">
+
+ <providers>
+ <jms-provider name="JMS" connection-factory="ConnectionFactory"
+ jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+ jndi-URL="localhost">
+
+ <jms-bus busid="service1_gtw">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service1_gtw"/>
+ </jms-bus>
+ <jms-bus busid="service1">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service1"/>
+ </jms-bus>
+ <jms-bus busid="service2">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service2"/>
+ </jms-bus>
+ <jms-bus busid="service3">
+ <jms-message-filter dest-type="QUEUE" dest-name="queue/LogicalEPRUnitTest_service3"/>
+ </jms-bus>
+ </jms-provider>
+ </providers>
+
+ <services>
+
+ <service category="MyServiceCategory" name="MyService1" description="Service 1">
+ <listeners>
+ <jms-listener name="JMS-Gateway" busidref="service1_gtw" is-gateway="true"/>
+ <jms-listener name="JMS-ESBListener" busidref="service1"/>
+ </listeners>
+ <actions>
+ <action name="invoke-service2" class="org.jboss.soa.esb.epr.ServiceInvokerAction" />
+ </actions>
+ </service>
+
+ <service category="MyServiceCategory" name="MyService2" description="Service 2">
+ <listeners>
+ <jms-listener name="JMS-ESBListener" busidref="service2"/>
+ </listeners>
+ <actions>
+ <action name="print" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message" value="Reply/Fault going to Service 3" />
+ </action>
+ <action name="Service2Action" class="org.jboss.soa.esb.epr.Service2Action" />
+ </actions>
+ </service>
+
+ <service category="MyServiceCategory" name="MyService3" description="Service 3">
+ <listeners>
+ <jms-listener name="JMS-ESBListener" busidref="service3"/>
+ </listeners>
+ <actions>
+ <action name="print" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message" value="Reply/Fault received at Service 3" />
+ </action>
+
+ <action name="Service3Action1" class="org.jboss.soa.esb.epr.Service3Action1" />
+
+ <action name="testStore" class="org.jboss.soa.esb.actions.StoreMessageToFile">
+ <property name="filename" value="LogicalEPRUnitTest.log" />
+ <property name="raw" value="true"/>
+ </action>
+
+ <!--
+ Just a noddy action to return a null message out of the pipeline
+ in order to avoid an exception...
+ -->
+ <action name="Service3Action2" class="org.jboss.soa.esb.epr.Service3Action2" />
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
Deleted: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml 2007-10-25 09:25:54 UTC (rev 16065)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
- <mbean code="org.jboss.jms.server.destination.QueueService"
- name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3"
- xmbean-dd="xmdesc/Queue-xmbean.xml">
- <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
- <depends>jboss.messaging:service=PostOffice</depends>
- </mbean>
-
-</server>
\ No newline at end of file
Copied: labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml (from rev 16065, labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml)
===================================================================
--- labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml (rev 0)
+++ labs/jbossesb/workspace/dbevenius/redeliver/qa/junit/src/org/jboss/soa/esb/epr/jms-service.xml 2007-10-25 11:12:24 UTC (rev 16067)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1_gtw"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service1"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service2"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+ <mbean code="org.jboss.jms.server.destination.QueueService"
+ name="jboss.esb.qa.junit.destination:service=Queue,name=LogicalEPRUnitTest_service3"
+ xmbean-dd="xmdesc/Queue-xmbean.xml">
+ <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+ <depends>jboss.messaging:service=PostOffice</depends>
+ </mbean>
+
+</server>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list