[jboss-svn-commits] JBL Code SVN: r13643 - in labs/jbossesb/trunk/product/samples/quickstarts/wiretap: src and 8 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jul 19 15:12:44 EDT 2007


Author: ldimaggi at redhat.com
Date: 2007-07-19 15:12:44 -0400 (Thu, 19 Jul 2007)
New Revision: 13643

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/ReceiveJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendCBRJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendStaticRouterJMSMessage.java
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendWiretapJMSMessage.java
Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/quickstart/
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/wiretap/build.xml
Log:
Reorganizing to match other quickstarts' dir structure



Modified: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/build.xml	2007-07-19 18:59:35 UTC (rev 13642)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/build.xml	2007-07-19 19:12:44 UTC (rev 13643)
@@ -12,7 +12,7 @@
 
     <target name="runtest-cbr" depends="compile">
         <echo>Runs Content Based Router Test</echo>
-        <java fork="yes" classname="quickstart.wiretap.test.SendCBRJMSMessage" failonerror="true">
+        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.SendCBRJMSMessage" failonerror="true">
             <arg value="ESB wiretap pattern quickstart - content based router test"/>
             <classpath refid="exec-classpath"/>
         </java>
@@ -20,7 +20,7 @@
 
     <target name="runtest" depends="compile">
         <echo>Runs JMS Sender - to destination channel</echo>
-        <java fork="yes" classname="quickstart.wiretap.test.SendJMSMessage" failonerror="true">
+        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.SendJMSMessage" failonerror="true">
             <arg value="ESB wiretap pattern quickstart - message to destination channel"/>
             <classpath refid="exec-classpath"/>
         </java>
@@ -28,7 +28,7 @@
 
     <target name="wiretap" depends="compile">
         <echo>Runs JMS Sender - to wiretap channel</echo>
-        <java fork="yes" classname="quickstart.wiretap.test.SendWiretapJMSMessage" failonerror="true">
+        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.SendWiretapJMSMessage" failonerror="true">
             <arg value="ESB wiretap pattern quickstart - message to wiretap channel"/>
             <classpath refid="exec-classpath"/>
         </java>
@@ -36,7 +36,7 @@
 
     <target name="static-router" depends="compile">
         <echo>Runs Static-Router Test</echo>
-        <java fork="yes" classname="quickstart.wiretap.test.SendStaticRouterJMSMessage" failonerror="true">
+        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.SendStaticRouterJMSMessage" failonerror="true">
             <arg value="ESB wiretap pattern quickstart - static router test"/>
             <classpath refid="exec-classpath"/>
         </java>
@@ -44,7 +44,7 @@
 
     <target name="receive-wiretap" depends="compile">
 	        <echo>Runs Test Wiretap message receiver</echo>
-	        <java fork="yes" classname="quickstart.wiretap.test.ReceiveJMSMessage" failonerror="true">
+	        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.ReceiveJMSMessage" failonerror="true">
 	            <arg value="queue/qswiretap_wire_out_Request"/>  
 	            <classpath refid="exec-classpath"/>
 	        </java>
@@ -52,7 +52,7 @@
 
     <target name="receive-destination" depends="compile">
 	        <echo>Runs Test Wiretap destination message receiver</echo>
-	        <java fork="yes" classname="quickstart.wiretap.test.ReceiveJMSMessage" failonerror="true">
+	        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.wiretap.test.ReceiveJMSMessage" failonerror="true">
 	            <arg value="queue/qswiretap_regular_Request"/>  
 	            <classpath refid="exec-classpath"/>
 	        </java>

Added: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/ReceiveJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/ReceiveJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/ReceiveJMSMessage.java	2007-07-19 19:12:44 UTC (rev 13643)
@@ -0,0 +1,94 @@
+/*
+ * 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.samples.quickstart.wiretap.test;
+
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueReceiver;
+import javax.jms.QueueSession;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
+
+import javax.jms.MessageListener;
+import javax.jms.Message;
+
+public class ReceiveJMSMessage {
+           QueueConnection conn = null;    
+           QueueSession receiverSession = null;    
+           Queue receiverQueue = null;     
+           QueueReceiver queueReceiver = null;
+           InitialContext iniCtx = null;
+           QueueConnectionFactory qcf = null;
+           String receiveQueueName = "queue/D"; // Default to queue/D
+
+           // Ref:  http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch6.chapt.html#d0e12917
+           public static class ExListener implements MessageListener
+           {
+              public void onMessage(Message msg)
+              {
+                  TextMessage tm = (TextMessage) msg;
+                  try {
+                      System.out.println("onMessage, recv text=" + tm.getText());
+                  } catch(Throwable t) {
+                    t.printStackTrace();
+                  }
+              }
+           }
+           
+           public ReceiveJMSMessage() {
+                   
+           }
+           public void receiveOne() {
+                   try {
+                   if (iniCtx == null) iniCtx = new InitialContext();
+                  if (qcf == null) qcf = (QueueConnectionFactory) iniCtx.lookup("ConnectionFactory");
+                  if (conn == null) {
+                      conn = qcf.createQueueConnection();
+                      conn.start();
+                  }    
+                  
+                  receiverQueue = (Queue) iniCtx.lookup(receiveQueueName);
+                  receiverSession = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+                  queueReceiver = receiverSession.createReceiver(receiverQueue);              
+                  TextMessage msg = (TextMessage) queueReceiver.receive(2000);
+                 
+                  // Ref:  http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch6.chapt.html#d0e12917
+                  queueReceiver.setMessageListener(new ExListener());
+
+                   } catch (Exception e) {
+                           System.out.println(e);
+                   }
+           }
+
+           public static void main(String[] args) {
+                      ReceiveJMSMessage receiver = new ReceiveJMSMessage();
+                      
+                      if(args[0] != null) {
+                          receiver.receiveQueueName = args[0];
+                          System.out.println("Receiving on: " + receiver.receiveQueueName );                     
+                      }                   
+                      while (true) { // loop until I'm killed
+                          receiver.receiveOne();
+                      }
+           }
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendCBRJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendCBRJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendCBRJMSMessage.java	2007-07-19 19:12:44 UTC (rev 13643)
@@ -0,0 +1,113 @@
+/*
+ * 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.samples.quickstart.wiretap.test;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.jms.JMSException;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueSession;
+import javax.jms.QueueSender;
+import javax.jms.ObjectMessage;
+import javax.jms.TextMessage;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class SendCBRJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/qswiretap_cbr_Request");   //quickstart_simple_cbr_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);    
+        TextMessage tm = session.createTextMessage(msg);  
+        send.send(tm);        
+        send.close();
+    }
+    
+    public String readAsciiFile(String fileName) throws IOException {
+		  FileReader fr = null;
+		  char[] thechars = null;
+
+		  try {
+			  File thefile = new File( fileName );
+			  fr = new FileReader( thefile );
+			  int size = (int) thefile.length();
+			  thechars = new char[size];
+		
+			  int count, index = 0;
+		
+			  // 	read in the bytes from the input stream
+			  while( ( count = fr.read( thechars, index, size ) ) > 0 ) {
+				  size -= count;
+				  index += count;
+			  }
+			} catch(Exception e) {	
+				System.out.println(e);
+			}
+			finally {
+				if( fr != null )
+		        fr.close();
+			}
+			return new String(thechars);
+
+    } // readAsciiFile
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+
+    	SendCBRJMSMessage sm = new SendCBRJMSMessage();
+    	sm.setupConnection();
+    	String fileContent = sm.readAsciiFile("SampleOrder.xml");
+    	System.out.println("---------------------------------------------");
+    	System.out.println(fileContent);
+    	System.out.println("---------------------------------------------");
+    	sm.sendAMessage(fileContent); 
+    	sm.stop();
+    	
+    }
+    
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendJMSMessage.java	2007-07-19 19:12:44 UTC (rev 13643)
@@ -0,0 +1,73 @@
+/*
+ * 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.samples.quickstart.wiretap.test;
+
+import javax.jms.JMSException;
+import javax.jms.TextMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendJMSMessage {
+	QueueConnection conn;
+
+	QueueSession session;
+
+	Queue que;
+
+	public void setupConnection() throws JMSException, NamingException {
+		InitialContext iniCtx = new InitialContext();
+		Object tmp = iniCtx.lookup("ConnectionFactory");
+		QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+		conn = qcf.createQueueConnection();
+		que = (Queue) iniCtx.lookup("queue/qswiretap_regular_Request");
+		session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+		conn.start();
+		System.out.println("Connection Started");
+	}
+
+	public void stop() throws JMSException {
+		conn.stop();
+		session.close();
+		conn.close();
+	}
+
+	public void sendAMessage(String msg) throws JMSException {
+
+		QueueSender send = session.createSender(que);
+		TextMessage tm = session.createTextMessage(msg);
+		send.send(tm);
+		send.close();
+	}
+
+	public static void main(String args[]) throws Exception {
+
+		SendJMSMessage sm = new SendJMSMessage();
+		sm.setupConnection();
+		sm.sendAMessage(args[0]);
+		sm.stop();
+	}
+
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendStaticRouterJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendStaticRouterJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendStaticRouterJMSMessage.java	2007-07-19 19:12:44 UTC (rev 13643)
@@ -0,0 +1,76 @@
+/*
+ * 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.samples.quickstart.wiretap.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendStaticRouterJMSMessage {
+    QueueConnection conn;
+    QueueSession session;
+    Queue que;
+    
+    
+    public void setupConnection() throws JMSException, NamingException
+    {
+    	InitialContext iniCtx = new InitialContext();
+    	Object tmp = iniCtx.lookup("ConnectionFactory");
+    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+    	conn = qcf.createQueueConnection();
+    	que = (Queue) iniCtx.lookup("queue/qswiretap_static_router_Request");
+    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+    	conn.start();
+    	System.out.println("Connection Started");
+    }
+    
+    public void stop() throws JMSException 
+    { 
+        conn.stop();
+        session.close();
+        conn.close();
+    }
+    
+    public void sendAMessage(String msg) throws JMSException {
+    	
+        QueueSender send = session.createSender(que);        
+        ObjectMessage tm = session.createObjectMessage(msg);
+        send.send(tm);        
+        send.close();
+    }
+       
+    
+    public static void main(String args[]) throws Exception
+    {        	    	
+    	SendStaticRouterJMSMessage sm = new SendStaticRouterJMSMessage();
+    	sm.setupConnection();
+    	sm.sendAMessage(args[0]); 
+    	sm.stop();
+    	
+    }
+    
+}

Added: labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendWiretapJMSMessage.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendWiretapJMSMessage.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/wiretap/src/org/jboss/soa/esb/samples/quickstart/wiretap/test/SendWiretapJMSMessage.java	2007-07-19 19:12:44 UTC (rev 13643)
@@ -0,0 +1,72 @@
+/*
+ * 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.samples.quickstart.wiretap.test;
+
+import javax.jms.JMSException;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSender;
+import javax.jms.QueueSession;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+public class SendWiretapJMSMessage {
+	QueueConnection conn;
+
+	QueueSession session;
+
+	Queue que;
+
+	public void setupAConnection() throws JMSException, NamingException {
+		InitialContext iniCtx = new InitialContext();
+		Object tmp = iniCtx.lookup("ConnectionFactory");
+		QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
+		conn = qcf.createQueueConnection();
+		que = (Queue) iniCtx.lookup("queue/qswiretap_wire_GW_Request");
+		session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
+		conn.start();
+		System.out.println("Connection to wiretap Started");
+	}
+
+	public void stop() throws JMSException {
+		conn.stop();
+		session.close();
+		conn.close();
+	}
+
+	public void sendMessage(String msg) throws JMSException {
+
+		QueueSender send = session.createSender(que);
+		ObjectMessage tm = session.createObjectMessage(msg);
+		send.send(tm);
+		send.close();
+	}
+
+	public static void main(String args[]) throws Exception {
+		SendWiretapJMSMessage sm = new SendWiretapJMSMessage();
+		sm.setupAConnection();
+		sm.sendMessage(args[0]);
+		sm.stop();
+	}
+
+}




More information about the jboss-svn-commits mailing list