[jboss-svn-commits] JBL Code SVN: r8550 - labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Dec 22 11:54:50 EST 2006


Author: burrsutter
Date: 2006-12-22 11:54:49 -0500 (Fri, 22 Dec 2006)
New Revision: 8550

Removed:
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/Launcher.java
   labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/MyJMSListenerAction.java
Log:


Deleted: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/Launcher.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/Launcher.java	2006-12-22 16:54:15 UTC (rev 8549)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/Launcher.java	2006-12-22 16:54:49 UTC (rev 8550)
@@ -1,80 +0,0 @@
-package quickstart;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.log4j.Logger;
-import org.jboss.soa.esb.listeners.gateway.GatewayListenerController;
-import org.jboss.soa.esb.listeners.message.EsbListenerController;
-import org.jboss.soa.esb.listeners.message.EsbListenerControllerFactory;
-
-
-public class Launcher {	
-	private static Log log = LogFactory.getLog(Launcher.class);
-	
-	private EsbListenerController	_esbListController;
-	private GatewayListenerController _gatewayController;
-	
-	
-	
-	private Logger _logger = Logger.getLogger(Launcher.class);
-	
-	public static void main (String args[]) throws Exception {
-		
-		log.info("args passed into Launcher: " + args.length);
-		for (int x=0; x<args.length; x++)
-			log.info("arg[" + x + "]=" + args[x]);
-		
-		
-		Launcher launcher = new Launcher();
-		
-		launcher.triggerListener(Long.valueOf(args[0]).longValue(), args[1], args[2]);
-	
-	}
-	
-	private void triggerListener(long runTime, String messageAwareConfigFile, 
-		String gatewayConfigFile) throws Exception{
-		try 
-        {
-								
-    		if (null != messageAwareConfigFile) {
-    			_logger.info("starting message aware listener with config file - " + 
-    					messageAwareConfigFile);
-    			_esbListController = EsbListenerControllerFactory.getInstance(messageAwareConfigFile);
-    		}
-    		if (null != gatewayConfigFile) {
-    			_logger.info("starting gateway listener with config file - " + 
-    					gatewayConfigFile);
-    			_gatewayController = new GatewayListenerController(gatewayConfigFile);
-    			new Thread(_gatewayController).start();
-    			Thread.sleep(2000);
-    		}
-    		
-    		System.out.println("**Listener Ready**");
-    		
-//    		This code is used to automatically shutdown the listeners which
-//    		might be useful for automated testing purposes. It is not needed
-//    		in the quickstart samples.
-//    		_logger.info("going to sleep now for " + runTime + " milliseconds...");    		
-//    		Thread.sleep(runTime);
-//    		if (null != messageAwareConfigFile) {
-//    			_logger.info("shutting down message aware listener...");
-//    			_esbListController.requestEnd();
-//    		}
-//    		
-//    		if (null != gatewayConfigFile) {
-//    			_logger.info("shutting down gateway listener...");
-//    			_gatewayController.requestEnd();
-//    		}
-    		
-    	
-        }
-        catch (Exception e) { 
-        	_logger.error(e);
-        	throw(e);
-        }
-        
-	
-	}		
-	
-
-}
\ No newline at end of file

Deleted: labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/MyJMSListenerAction.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/MyJMSListenerAction.java	2006-12-22 16:54:15 UTC (rev 8549)
+++ labs/jbossesb/trunk/product/samples/quickstarts/helloworld_action/src/quickstart/MyJMSListenerAction.java	2006-12-22 16:54:49 UTC (rev 8550)
@@ -1,60 +0,0 @@
-package quickstart;
-
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.Header;
-import org.jboss.soa.esb.message.Body;
-import org.jboss.soa.esb.addressing.Call;
-import org.jboss.soa.esb.addressing.EPR;
-import org.apache.log4j.Logger;
-
-public class MyJMSListenerAction
-{
-    
-  protected ConfigTree	_config;
-	  
-  public MyJMSListenerAction(ConfigTree config) { _config = config; } 
-  
-  public Message noOperation(Message message) { return message; } 
-
-  public Message displayMessage(Message message) throws Exception{		
-		  logHeader();
-		  System.out.println("Body: " + new String(message.getBody().getContents()));
-		  logFooter();
-		  return message;         	
-	}
-  
-   public Message playWithMessage(Message message) throws Exception {
-	   Header msgHeader = message.getHeader();
-	   Body msgBody = message.getBody();
-	   Call theCall = msgHeader.getCall();
-	   EPR theEpr = theCall.getFrom();
-	   String contents = new String(msgBody.getContents());
-	   StringBuffer sb = new StringBuffer();
-	   sb.append("BEFORE\n");
-	   sb.append(contents);
-	   sb.append("\nAFTER");
-	   msgBody.setContents(sb.toString().getBytes());
-	   return message;
-   }
-   
-   public void exceptionHandler(Message message, Throwable exception) {
-	   logHeader();
-	   System.out.println("!ERROR!");
-	   System.out.println(exception.getMessage());
-	   System.out.println("For Message: ");
-	   System.out.println(message.getBody().getContents());
-	   logFooter();
-   }
-	
-   // This makes it easier to read on the console
-   private void logHeader() {
-	   System.out.println("\n&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
-   }
-   private void logFooter() {
-	   System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&\n");
-   }
-    
-	
-}
\ No newline at end of file




More information about the jboss-svn-commits mailing list