[jboss-svn-commits] JBL Code SVN: r14056 - labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer1/test.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Aug 6 22:27:27 EDT 2007
Author: james.williams at jboss.com
Date: 2007-08-06 22:27:26 -0400 (Mon, 06 Aug 2007)
New Revision: 14056
Modified:
labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer1/test/SendEsbMessage.java
Log:
fixed ServiceInvoker close.
Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer1/test/SendEsbMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer1/test/SendEsbMessage.java 2007-08-06 22:26:35 UTC (rev 14055)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_consumer1/src/org/jboss/soa/esb/samples/quickstart/webservice_consumer1/test/SendEsbMessage.java 2007-08-07 02:27:26 UTC (rev 14056)
@@ -20,11 +20,11 @@
*/
package org.jboss.soa.esb.samples.quickstart.webservice_consumer1.test;
+import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
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.message.format.MessageType;
-import org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPoolContainer;
public class SendEsbMessage
{
@@ -36,11 +36,12 @@
{
// Create the delivery adapter for the target service (cache it)
System.setProperty("javax.xml.registry.ConnectionFactoryClass",
- "org.apache.ws.scout.registry.ConnectionFactoryImpl");
+ "org.apacheServiceInvoker..ws.scout.registry.ConnectionFactoryImpl");
// Create the delivery adapter for the target service (cache it)
ServiceInvoker deliveryAdapter = new ServiceInvoker("MyServiceCategory",
"WebserviceConsumer1");
+
// Create and populate the request message...
Message requestMessage = MessageFactory.getInstance().getMessage(
@@ -53,22 +54,9 @@
Message replyMessage = deliveryAdapter.deliverSync(requestMessage, 20000);
//need to cleanup connection pool for service invoker
- cleanupConnection();
+ deliveryAdapter.close();
}
- private void cleanupConnection()
- {
- try
- {
- //This static call is kind of clunky because the gateway might not be JMS based.
- //But, the JMS gateway is the only gateway that currently has a connection pool.
- JmsConnectionPoolContainer.removeAllPools();
- } catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
public static void main(String args[]) throws Exception
{
SendEsbMessage sm = new SendEsbMessage();
More information about the jboss-svn-commits
mailing list