[jboss-svn-commits] JBL Code SVN: r29685 - in labs/jbossesb/trunk/product: rosetta/src/org/jboss/soa/esb/actions and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Oct 20 07:50:07 EDT 2009
Author: tfennelly
Date: 2009-10-20 07:50:07 -0400 (Tue, 20 Oct 2009)
New Revision: 29685
Added:
labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SyncServiceInvoker.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/ResponseAction.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/StartTransaction.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/SyncServiceInvokerUnitTest.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-01.xml
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-02.xml
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-03.xml
Modified:
labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2785
Add synchronous service invocation action
Modified: labs/jbossesb/trunk/product/docs/ProgrammersGuide.odt
===================================================================
(Binary files differ)
Added: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SyncServiceInvoker.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SyncServiceInvoker.java (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/actions/SyncServiceInvoker.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,122 @@
+/*
+ * 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.actions;
+
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.message.MessageDeliverException;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.soa.esb.addressing.Call;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.apache.log4j.Logger;
+
+/**
+ * Synchronous Service Invoker.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class SyncServiceInvoker extends AbstractActionPipelineProcessor {
+
+ private static Logger logger = Logger.getLogger(SyncServiceInvoker.class);
+
+ private ServiceInvoker serviceInvoker;
+ private long timeout;
+ private boolean failOnException;
+ private boolean suspendTransaction;
+
+ public SyncServiceInvoker(ConfigTree configTree) throws ConfigurationException, MessageDeliverException {
+ String serviceCat = configTree.getRequiredAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG);
+ String serviceName = configTree.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+
+ serviceInvoker = new ServiceInvoker(serviceCat, serviceName);
+ timeout = configTree.getLongAttribute(ListenerTagNames.SERVICE_INVOKER_TIMEOUT, 30000L);
+ failOnException = configTree.getBooleanAttribute(ListenerTagNames.FAIL_ON_EXCEPTION, true);
+ suspendTransaction = configTree.getBooleanAttribute(ListenerTagNames.SUSPEND_TRANSACTION, false);
+ }
+
+ public Message process(Message message) throws ActionProcessingException {
+ // Zap the faulto and replyto EPRs before sending...
+ Call call = message.getHeader().getCall();
+ EPR faultTo = call.getFaultTo();
+ EPR replyTo = call.getReplyTo();
+ Object txObject = null;
+
+ if(isTransactional() && suspendTransaction) {
+ try {
+ txObject = TransactionStrategy.getTransactionStrategy(true).suspend();
+ } catch (TransactionStrategyException e) {
+ throw new ActionProcessingException("Error suspending transaction on service '" + serviceInvoker.getService() + "'", e);
+ }
+ }
+
+ try {
+ call.setFaultTo(null);
+ call.setReplyTo(null);
+
+ return serviceInvoker.deliverSync(message, timeout);
+ } catch (Exception e) {
+ // No real need to reset the EPRs because the pipeline has already captured them, but
+ // lets do it anyway...
+ call.setFaultTo(faultTo);
+ call.setReplyTo(replyTo);
+
+ if (failOnException) {
+ throw new ActionProcessingException("Error delivering message to service '" + serviceInvoker.getService() + "'", e);
+ } else {
+ logger.debug("Exception during deliverSync(). Action configured to continue.", e);
+ return message;
+ }
+ } finally {
+ try {
+ if(txObject != null) {
+ TransactionStrategy.getTransactionStrategy(true).resume(txObject);
+ }
+ } catch (TransactionStrategyException e) {
+ throw new ActionProcessingException("Error resuming transaction on service '" + serviceInvoker.getService() + "'", e);
+ }
+ }
+ }
+
+ private boolean isTransactional() throws ActionProcessingException {
+ try {
+ TransactionStrategy txStrategy = TransactionStrategy.getTransactionStrategy(true);
+
+ if (txStrategy == null) {
+ return false;
+ }
+
+ if (txStrategy.getTransaction() != null) {
+ if (txStrategy.isActive()) {
+ return true;
+ } else {
+ throw new ActionProcessingException("Associated transaction is no longer active!");
+ }
+ }
+ } catch (final TransactionStrategyException ex) {
+ throw new ActionProcessingException("Could not determine transactionality.", ex);
+ }
+
+ return false;
+ }
+}
Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2009-10-20 10:31:18 UTC (rev 29684)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/ListenerTagNames.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -99,6 +99,8 @@
public static final String ROLES_ALLOWED = "rolesAllowed";
public static final String MODULE_NAME_TAG = "moduleName";
public static final String CALLBACK_HANDLER_TAG = "callbackHandler";
+ public static final String FAIL_ON_EXCEPTION = "failOnException";
+ public static final String SUSPEND_TRANSACTION = "suspendTransaction";
public static final String MEP_ONE_WAY = "OneWay" ;
Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java 2009-10-20 10:31:18 UTC (rev 29684)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/internal/soa/esb/rosetta/pooling/MockTransactionStrategy.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -35,6 +35,11 @@
public static Object transactionObject;
public static boolean isActive;
+ public static void reset() {
+ transactionObject = null;
+ isActive = false;
+ }
+
public void begin() throws TransactionStrategyException {
}
@@ -52,7 +57,12 @@
}
public Object suspend() throws TransactionStrategyException {
- return transactionObject;
+ try {
+ return transactionObject;
+ } finally {
+ transactionObject = null;
+ isActive = false;
+ }
}
public boolean isActive() throws TransactionStrategyException {
@@ -60,7 +70,8 @@
}
public void resume(Object tx) throws TransactionStrategyException {
-
+ transactionObject = tx;
+ isActive = true;
}
public void registerSynchronization(Synchronization sync) throws TransactionStrategyException {
Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/ResponseAction.java (from rev 29651, labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/mock/MockAction.java)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/ResponseAction.java (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/ResponseAction.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,63 @@
+/*
+ * 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.actions;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ResponseAction extends AbstractActionPipelineProcessor {
+
+ public static Message requestMessage;
+ public static Message responseMessage;
+ public static ActionProcessingException exception;
+
+ public ResponseAction(ConfigTree config) {
+ }
+
+ public Message process(final Message message) throws ActionProcessingException {
+ if(exception != null) {
+ throw exception;
+ }
+ requestMessage = message;
+ return ResponseAction.responseMessage;
+ }
+
+ public static void waitForMessage(long timeout) {
+ long start = System.currentTimeMillis();
+
+ while(requestMessage == null && System.currentTimeMillis() < start + timeout) {
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ TestCase.fail("Unexpected thread interrupt.");
+ }
+ }
+
+ if(requestMessage == null) {
+ TestCase.fail("Timed out waiting on message");
+ }
+ }
+}
\ No newline at end of file
Property changes on: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/ResponseAction.java
___________________________________________________________________
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/StartTransaction.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/StartTransaction.java (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/StartTransaction.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,42 @@
+/*
+ * 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.actions;
+
+import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.internal.soa.esb.rosetta.pooling.MockTransactionStrategy;
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class StartTransaction extends AbstractActionPipelineProcessor {
+
+ public StartTransaction(ConfigTree config) {
+ }
+
+ public Message process(final Message message) throws ActionProcessingException {
+ MockTransactionStrategy.transactionObject = new Object();
+ MockTransactionStrategy.isActive = true;
+ return message;
+ }
+}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/SyncServiceInvokerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/SyncServiceInvokerUnitTest.java (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/SyncServiceInvokerUnitTest.java 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,174 @@
+/*
+ * 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.actions;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.testutils.AbstractTestRunner;
+import org.jboss.soa.esb.client.ServiceInvoker;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.format.MessageFactory;
+import org.jboss.soa.esb.couriers.FaultMessageException;
+import org.jboss.soa.esb.common.TransactionStrategy;
+import org.jboss.soa.esb.common.TransactionStrategyException;
+import org.jboss.internal.soa.esb.rosetta.pooling.MockTransactionStrategy;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class SyncServiceInvokerUnitTest extends TestCase {
+
+ protected void setUp() throws Exception {
+ ResponseAction.responseMessage = null;
+ ResponseAction.exception = null;
+ }
+
+ public void test_OK() throws Exception {
+ AbstractTestRunner testRunner = new AbstractTestRunner() {
+ public void test() throws Exception {
+ ServiceInvoker invoker = new ServiceInvoker("Services", "ServiceA");
+ Message request = MessageFactory.getInstance().getMessage();
+
+ request.getBody().add("Hello");
+
+ ResponseAction.responseMessage = MessageFactory.getInstance().getMessage();
+ ResponseAction.responseMessage.getBody().add("Goodbye");
+
+ Message response = invoker.deliverSync(request, 10000);
+ assertEquals("Goodbye", response.getBody().get());
+ }
+ }.setServiceConfig("sync-invoker-config-01.xml");
+
+ testRunner.run();
+ }
+
+ public void test_exception_fail() throws Exception {
+ AbstractTestRunner testRunner = new AbstractTestRunner() {
+ public void test() throws Exception {
+ ServiceInvoker invoker = new ServiceInvoker("Services", "ServiceA");
+ Message request = MessageFactory.getInstance().getMessage();
+
+ request.getBody().add("Hello");
+
+ ResponseAction.exception = new ActionProcessingException("Exception!!");
+
+ try {
+ invoker.deliverSync(request, 10000);
+ fail("Expected FaultMessageException");
+ } catch(FaultMessageException e) {
+ assertEquals("Error delivering message to service 'Services:ServiceB'", e.getCause().getMessage());
+ }
+ }
+ }.setServiceConfig("sync-invoker-config-01.xml");
+
+ testRunner.run();
+ }
+
+ public void test_exception_OK() throws Exception {
+ AbstractTestRunner testRunner = new AbstractTestRunner() {
+ public void test() throws Exception {
+ ServiceInvoker invoker = new ServiceInvoker("Services", "ServiceA");
+ Message request = MessageFactory.getInstance().getMessage();
+
+ request.getBody().add("Hello");
+
+ ResponseAction.exception = new ActionProcessingException("Exception!!");
+
+ invoker.deliverSync(request, 10000);
+ }
+ }.setServiceConfig("sync-invoker-config-02.xml");
+
+ testRunner.run();
+ }
+
+ public void x_test_transaction_not_suspend() throws Exception {
+ AbstractTestRunner testRunner = new AbstractTestRunner() {
+ public void test() throws Exception {
+ SuspendedTransactionStrategy suspendedTxStrategy = new SuspendedTransactionStrategy();
+
+ TransactionStrategy.setTransactionStrategy(suspendedTxStrategy);
+ try {
+ ServiceInvoker invoker = new ServiceInvoker("Services", "ServiceA");
+ Message request = MessageFactory.getInstance().getMessage();
+ ResponseAction.responseMessage = MessageFactory.getInstance().getMessage();
+
+ request.getBody().add("Hello");
+
+ // Need to deliver async here because we're in a transaction (mock transaction)...
+ invoker.deliverAsync(request);
+ ResponseAction.waitForMessage(10000);
+ } finally {
+ TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
+ }
+
+ assertFalse(suspendedTxStrategy.suspended);
+ assertFalse(suspendedTxStrategy.resumed);
+ }
+ }.setServiceConfig("sync-invoker-config-01.xml");
+
+ testRunner.run();
+ }
+
+ public void x_test_transaction_suspend() throws Exception {
+ AbstractTestRunner testRunner = new AbstractTestRunner() {
+ public void test() throws Exception {
+ SuspendedTransactionStrategy suspendedTxStrategy = new SuspendedTransactionStrategy();
+
+ TransactionStrategy.setTransactionStrategy(suspendedTxStrategy);
+ try {
+ ServiceInvoker invoker = new ServiceInvoker("Services", "ServiceA");
+ Message request = MessageFactory.getInstance().getMessage();
+ ResponseAction.responseMessage = MessageFactory.getInstance().getMessage();
+
+ request.getBody().add("Hello");
+
+ // Need to deliver async here because we're in a transaction (mock transaction)...
+ invoker.deliverAsync(request);
+ ResponseAction.waitForMessage(10000);
+ } finally {
+ TransactionStrategy.setTransactionStrategy(new TransactionStrategy.NullTransactionStrategy());
+ }
+
+ assertTrue(suspendedTxStrategy.suspended);
+ assertTrue(suspendedTxStrategy.resumed);
+ }
+ }.setServiceConfig("sync-invoker-config-03.xml");
+
+ testRunner.run();
+ }
+
+ private class SuspendedTransactionStrategy extends MockTransactionStrategy {
+ private boolean suspended = false;
+ private boolean resumed = false;
+
+ private SuspendedTransactionStrategy() {
+ reset();
+ }
+
+ public Object suspend() throws TransactionStrategyException {
+ suspended = true;
+ return super.suspend();
+ }
+
+ public void resume(Object tx) throws TransactionStrategyException {
+ resumed = true;
+ super.resume(tx);
+ }
+ }
+}
Copied: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-01.xml (from rev 29651, labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/in-listener-config-05.xml)
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-01.xml (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-01.xml 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,23 @@
+<?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">
+
+ <services>
+
+ <service category="Services" name="ServiceB" description="ServiceB" invmScope="GLOBAL">
+ <actions mep="RequestResponse">
+ <action name="action" class="org.jboss.soa.esb.actions.ResponseAction" />
+ </actions>
+ </service>
+
+ <service category="Services" name="ServiceA" description="ServiceA" invmScope="GLOBAL">
+ <actions mep="RequestResponse">
+ <action name="action" class="org.jboss.soa.esb.actions.SyncServiceInvoker">
+ <property name="service-category" value="Services" />
+ <property name="service-name" value="ServiceB" />
+ </action>
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
\ No newline at end of file
Property changes on: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-01.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:mergeinfo
+
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-02.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-02.xml (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-02.xml 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,24 @@
+<?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">
+
+ <services>
+
+ <service category="Services" name="ServiceB" description="ServiceB" invmScope="GLOBAL">
+ <actions mep="RequestResponse">
+ <action name="action" class="org.jboss.soa.esb.actions.ResponseAction" />
+ </actions>
+ </service>
+
+ <service category="Services" name="ServiceA" description="ServiceA" invmScope="GLOBAL">
+ <actions mep="RequestResponse">
+ <action name="action" class="org.jboss.soa.esb.actions.SyncServiceInvoker">
+ <property name="service-category" value="Services" />
+ <property name="service-name" value="ServiceB" />
+ <property name="failOnException" value="false" />
+ </action>
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-03.xml
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-03.xml (rev 0)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/actions/sync-invoker-config-03.xml 2009-10-20 11:50:07 UTC (rev 29685)
@@ -0,0 +1,25 @@
+<?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">
+
+ <services>
+
+ <service category="Services" name="ServiceB" description="ServiceB" invmScope="GLOBAL">
+ <actions mep="RequestResponse">
+ <action name="action" class="org.jboss.soa.esb.actions.ResponseAction" />
+ </actions>
+ </service>
+
+ <service category="Services" name="ServiceA" description="ServiceA" invmScope="GLOBAL">
+ <actions mep="OneWay">
+ <action name="startTX" class="org.jboss.soa.esb.actions.StartTransaction" />
+ <action name="action" class="org.jboss.soa.esb.actions.SyncServiceInvoker">
+ <property name="service-category" value="Services" />
+ <property name="service-name" value="ServiceB" />
+ <property name="suspendTransaction" value="true" />
+ </action>
+ </actions>
+ </service>
+
+ </services>
+
+</jbossesb>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list