[jboss-svn-commits] JBL Code SVN: r20921 - in labs/jbossesb/trunk/product: rosetta/tests/src/org/jboss/soa/esb/listeners/gateway and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Jul 5 10:57:03 EDT 2008
Author: kevin.conner at jboss.com
Date: 2008-07-05 10:57:03 -0400 (Sat, 05 Jul 2008)
New Revision: 20921
Modified:
labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java
labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/SOAPClient_Request_UnitTest.java
labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-01.xml
labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-02.xml
Log:
Updating remoting configurations to prevent conflict: JBESB-1727
Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2008-07-05 13:55:56 UTC (rev 20920)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2008-07-05 14:57:03 UTC (rev 20921)
@@ -250,6 +250,10 @@
logger.info("JBoss Remoting Gateway listener '" + getConfig().getName() + "' started.");
} catch (Throwable throwable) {
+ if (connector != null)
+ {
+ connector.stop() ;
+ }
connector = null;
throw new ManagedLifecycleException("Unable to start Remoting Listener instsance " + getClass().getName(), throwable);
}
Modified: labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java 2008-07-05 13:55:56 UTC (rev 20920)
+++ labs/jbossesb/trunk/product/rosetta/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java 2008-07-05 14:57:03 UTC (rev 20921)
@@ -35,7 +35,6 @@
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.ListenerTagNames;
@@ -154,15 +153,15 @@
}
public void test_delivery(String protocol, boolean synchronous) throws Throwable {
- startServer(protocol, synchronous);
- sendMessageToServer(protocol, protocol + "_payload");
+ startServer(protocol, synchronous, "8888");
+ sendMessageToServer(protocol, protocol + "_payload", "8888");
stopServer();
}
public void x_test_profile() throws Throwable {
- startServer("http", false);
+ startServer("http", false, "8889");
for(int i = 0; i < 10000; i++) {
- sendMessageToServer("http", "xxx_payload");
+ sendMessageToServer("http", "xxx_payload", "8889");
MockCourierFactory.resetCouriers();
Thread.sleep(50);
}
@@ -170,8 +169,8 @@
}
@SuppressWarnings("serial")
- private void startServer(String protocol, boolean synchronous) throws SAXException, ConfigurationException, ManagedLifecycleException {
- ConfigTree config = getConfig("cat", "servicex", protocol, "8888");
+ private void startServer(String protocol, boolean synchronous, final String port) throws SAXException, ConfigurationException, ManagedLifecycleException {
+ ConfigTree config = getConfig("cat", "servicex", protocol, port);
if(synchronous) {
listener = new JBossRemotingGatewayListener(config) {
@@ -199,9 +198,9 @@
listener.doStart();
}
- private void sendMessageToServer(String protocol, Object messagePayload) throws Throwable {
+ private void sendMessageToServer(String protocol, Object messagePayload, final String port) throws Throwable {
- String locatorURI = protocol + "://" + InetAddress.getLocalHost().getHostName() + ":8888";
+ String locatorURI = protocol + "://" + InetAddress.getLocalHost().getHostName() + ":" + port;
InvokerLocator locator = new InvokerLocator(locatorURI);
System.out.println("Calling remoting server with locator uri of: " + locatorURI);
Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/SOAPClient_Request_UnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/SOAPClient_Request_UnitTest.java 2008-07-05 13:55:56 UTC (rev 20920)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/SOAPClient_Request_UnitTest.java 2008-07-05 14:57:03 UTC (rev 20921)
@@ -38,17 +38,17 @@
public void test_request_no_wsdl_endpoint_override() throws Exception {
// soapclient-request-config-01.xml doesn't define an "endpointURL" which would override the wsdl wsEndpoint
// being invoked by the SOAPClient...
- test_request("soapclient-request-config-01.xml", "http://localhost:14999/");
+ test_request("soapclient-request-config-01.xml", "http://localhost:14999/", "http://localhost:15000");
}
public void test_request_wsdl_endpoint_override() throws Exception {
// soapclient-request-config-02.xml defines an "endpointURL" which overrides the wsdl wsEndpoint
// being invoked by the SOAPClient ("http://localhost:15111/")...
- test_request("soapclient-request-config-02.xml", "http://localhost:15111/");
+ test_request("soapclient-request-config-02.xml", "http://localhost:15111/", "http://localhost:15112");
}
- public void test_request(String esbConfig, String wsEndpoint) throws Exception {
- JBRServer wsdlServer = new JBRServer("http://localhost:13999/", new StaticRequestResponseHandler(getClass().getResourceAsStream("request-test-01.wsdl")));
+ private void test_request(String esbConfig, String wsEndpoint, final String wsdlEndpoint) throws Exception {
+ JBRServer wsdlServer = new JBRServer(wsdlEndpoint, new StaticRequestResponseHandler(getClass().getResourceAsStream("request-test-01.wsdl")));
StaticRequestResponseHandler wsEndpointHandler = new StaticRequestResponseHandler("<response/>");
JBRServer wsEndpointServer = new JBRServer(wsEndpoint, wsEndpointHandler);
Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-01.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-01.xml 2008-07-05 13:55:56 UTC (rev 20920)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-01.xml 2008-07-05 14:57:03 UTC (rev 20921)
@@ -5,7 +5,7 @@
<service category="OrderManagement" name="GoodbyeService" description="Goodbye Service" invmScope="GLOBAL">
<actions>
<action name="invoke-ws" class="org.jboss.soa.esb.actions.soap.request.MockSOAPClient">
- <property name="wsdl" value="http://localhost:13999/"/>
+ <property name="wsdl" value="http://localhost:15000/"/>
<!-- Not overridding the the WS endpoint URL with the "endpointUrl" property. SOAPClient will
use that defined in the WSDL -->
<property name="SOAPAction" value="sayGoodbye"/>
Modified: labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-02.xml
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-02.xml 2008-07-05 13:55:56 UTC (rev 20920)
+++ labs/jbossesb/trunk/product/services/soap/src/test/java/org/jboss/soa/esb/actions/soap/request/soapclient-request-config-02.xml 2008-07-05 14:57:03 UTC (rev 20921)
@@ -5,7 +5,7 @@
<service category="OrderManagement" name="GoodbyeService" description="Goodbye Service" invmScope="GLOBAL">
<actions>
<action name="invoke-ws" class="org.jboss.soa.esb.actions.soap.request.MockSOAPClient">
- <property name="wsdl" value="http://localhost:13999/"/>
+ <property name="wsdl" value="http://localhost:15112/"/>
<property name="endpointUrl" value="http://localhost:15111/"/> <!-- Overriding the WS endpoint URL, so not using that defined in the -->
<property name="SOAPAction" value="sayGoodbye"/>
</action>
More information about the jboss-svn-commits
mailing list