[jboss-svn-commits] JBL Code SVN: r5337 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 28 00:46:40 EDT 2006


Author: estebanschifman
Date: 2006-07-28 00:46:39 -0400 (Fri, 28 Jul 2006)
New Revision: 5337

Modified:
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/SqlTablePoller.java
Log:
Change sendNotification() argument from Object to Serializable

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java	2006-07-28 04:45:54 UTC (rev 5336)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java	2006-07-28 04:46:39 UTC (rev 5337)
@@ -12,7 +12,6 @@
 import javax.naming.*;
 import javax.jms.*;
 
-//import org.jboss.soa.esb.samples.loanbroker.domain.LoanBrokerConstants;
 import org.jboss.soa.esb.services.*;
 import org.jboss.soa.esb.util.*;
 import org.jboss.soa.esb.common.*;
@@ -23,11 +22,6 @@
 
 public class JmsQueueListener
 {  
-	public static void main(String[] args) throws Exception
-	{
-	    new JmsQueueListener(args[0]);
-	}
-
   // You can override this value at constructor time of your
   // derived class after calling super(String)
   protected int	m_iDfltReloadMillis= 180000 // default interval between
@@ -67,7 +61,7 @@
   
   
 
-  protected JmsQueueListener(String p_sParamsUid) throws Exception
+  public JmsQueueListener(String p_sParamsUid) throws Exception
   {
     m_oLogger = EsbUtil.getDefaultLogger(this.getClass());
 
@@ -479,7 +473,7 @@
 	  public void notifyOK()
 	  { try
 	    { 
-		  Object oNotif = m_oExec.getOkNotification();
+		  Serializable oNotif = m_oExec.getOkNotification();
 		  for (DomElement oCurr : m_oParms.getElementChildren(NotificationList.ELEMENT))
 	      { NotificationList oNL = new NotificationList(oCurr);
 	        if (! oNL.isOK())    continue;
@@ -491,7 +485,7 @@
 
 	  public void notifyError(Exception p_e)
 	  { 
-		Object oNotif = (null==m_oExec) 
+		Serializable oNotif = (null==m_oExec) 
 			? "No action class instantiated" 
 			: m_oExec.getErrorNotification();
 		ByteArrayOutputStream oBO = new ByteArrayOutputStream();

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/SqlTablePoller.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/SqlTablePoller.java	2006-07-28 04:45:54 UTC (rev 5336)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/SqlTablePoller.java	2006-07-28 04:46:39 UTC (rev 5337)
@@ -24,6 +24,7 @@
 package org.jboss.soa.esb.listeners;
 
 import java.util.*;
+import java.io.Serializable;
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.lang.reflect.*;
@@ -542,11 +543,11 @@
 	  public void notifyOK()
 	  { try
 	    { 
-		  String sNotif = getOkNotifContent();
+		  java.io.Serializable oNotif = getOkNotifContent();
 		  for (DomElement oCurr : m_oParms.getElementChildren(NotificationList.ELEMENT))
 	      { NotificationList oNL = new NotificationList(oCurr);
 	        if (! oNL.isOK())    continue;
-	        getNotifHandler().sendNotifications(oCurr,sNotif);
+	        getNotifHandler().sendNotifications(oCurr,oNotif);
 	      }
 	    }
 	    catch (Exception e) {}
@@ -554,11 +555,11 @@
 
 	  public void notifyError(Exception p_e)
 	  { 
-		String sNotif = getErrorNotifContent();
+		Serializable oNotif = getErrorNotifContent();
 		ByteArrayOutputStream oBO = new ByteArrayOutputStream();
 	    PrintStream oPS = new PrintStream(oBO);
 	    try
-	    { oPS.println(sNotif);
+	    { oPS.println(oNotif);
 	      if (null != p_e) p_e.printStackTrace(oPS);
 	      oPS.close();
 
@@ -587,11 +588,11 @@
 	  } //______________________________
 	  
 	  // These methods to be overriden by you own derived class
-	  protected String getOkNotifContent()
+	  protected Serializable getOkNotifContent()
 	  {
 		  return "Success";
 	  }
-	  protected String getErrorNotifContent()
+	  protected Serializable getErrorNotifContent()
 	  {
 		  return "FAILURE";
 	  }




More information about the jboss-svn-commits mailing list