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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jul 28 00:45:55 EDT 2006


Author: estebanschifman
Date: 2006-07-28 00:45:54 -0400 (Fri, 28 Jul 2006)
New Revision: 5336

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

Modified: labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java
===================================================================
--- labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java	2006-07-28 04:45:03 UTC (rev 5335)
+++ labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbAbstractProcessor.java	2006-07-28 04:45:54 UTC (rev 5336)
@@ -239,10 +239,10 @@
     return (null==BO) ? -1 : BO.getUid();
   } //________________________________
 
-  public void notifyOK(Object p_o)
+  public void notifyOK(Serializable p_o)
   { try
-    { String sMsg = p_o.toString();
-      DomElement[] oaP = m_oParms.getElementChildren(NotificationList.ELEMENT);
+    { 
+	  DomElement[] oaP = m_oParms.getElementChildren(NotificationList.ELEMENT);
       for (int i1=0; i1<oaP.length;i1++)
       { NotificationList oCurr = new NotificationList(oaP[i1]);
         if (! oCurr.isOK())    continue;
@@ -250,28 +250,23 @@
         m_oLogger.info("BEFORE EXPAND <"+m_oContext.get(CTX_BATCH_UID)+">");
         replaceMacros(oCpy);
         m_oLogger.info("AFTER EXPAND \n"+oCpy.toString()+"\n");
-        getNotifHandler().sendNotifications(oCpy,sMsg);
+        getNotifHandler().sendNotifications(oCpy,p_o);
       }
     }
     catch (Exception e) {}
   } //__________________________________
 
-  public void notifyError(Exception p_e, Object p_o)
-  { ByteArrayOutputStream oBO = new ByteArrayOutputStream();
-    PrintStream oPS = new PrintStream(oBO);
+  public void notifyError(Exception p_e, Serializable p_o)
+  { 
     try
-    { oPS.println(p_o.toString());
-      if (null != p_e) p_e.printStackTrace(oPS);
-      oPS.close();
-
-      String sMsg = oBO.toString();
+    { 
       DomElement[] oaP = m_oParms.getElementChildren(NotificationList.ELEMENT);
       if (oaP.length<1)    //  Uncomment this line to send only to the list
-        getNotifHandler().sendNotifications(sMsg);
+        getNotifHandler().sendNotifications(p_o);
       for (int i1=0; i1<oaP.length;i1++)
       { NotificationList oCurr = new NotificationList(oaP[i1]);
         if (! oCurr.isErr())    continue;
-        getNotifHandler().sendNotifications(oaP[i1],sMsg);
+        getNotifHandler().sendNotifications(oaP[i1],p_o);
       }
     }
     catch (Exception e) {

Modified: labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java
===================================================================
--- labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java	2006-07-28 04:45:03 UTC (rev 5335)
+++ labs/jbossesb/trunk/product/core/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java	2006-07-28 04:45:54 UTC (rev 5336)
@@ -23,6 +23,7 @@
 
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.io.Serializable;
 
 import javax.jms.Message;
 import javax.jms.TextMessage;
@@ -69,7 +70,7 @@
    * @return  Object - The Rosetta notification framework
    * will use the toString() method of the returned Object 
    */
-  public Object getOkNotification()
+  public Serializable getOkNotification()
   {
 	  return messagePfx()+" Normal completion";
   }
@@ -81,7 +82,7 @@
    * @return  Object - The Rosetta notification framework
    * will use the toString() method of the returned Object 
    */
-  public Object getErrorNotification()
+  public Serializable getErrorNotification()
   {
 	  return messagePfx()+" Abnormal end";
   }




More information about the jboss-svn-commits mailing list