[jboss-svn-commits] JBL Code SVN: r5243 - in labs/jbossesb/trunk/ESBCore: listeners/src/org/jboss/soa/esb/listeners processors/src/org/jboss/soa/esb/processors
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Jul 22 06:57:55 EDT 2006
Author: arvinder
Date: 2006-07-22 06:57:51 -0400 (Sat, 22 Jul 2006)
New Revision: 5243
Added:
labs/jbossesb/trunk/ESBCore/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java
Modified:
labs/jbossesb/trunk/ESBCore/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
Log:
Removed unused import and readded missing class as there was a reference to it.
Modified: labs/jbossesb/trunk/ESBCore/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java 2006-07-22 08:50:14 UTC (rev 5242)
+++ labs/jbossesb/trunk/ESBCore/listeners/src/org/jboss/soa/esb/listeners/JmsQueueListener.java 2006-07-22 10:57:51 UTC (rev 5243)
@@ -12,7 +12,7 @@
import javax.naming.*;
import javax.jms.*;
-import org.jboss.soa.esb.samples.loanbroker.domain.LoanBrokerConstants;
+//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.*;
Added: labs/jbossesb/trunk/ESBCore/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java
===================================================================
--- labs/jbossesb/trunk/ESBCore/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java 2006-07-22 08:50:14 UTC (rev 5242)
+++ labs/jbossesb/trunk/ESBCore/processors/src/org/jboss/soa/esb/processors/EsbMsgProcessor.java 2006-07-22 10:57:51 UTC (rev 5243)
@@ -0,0 +1,78 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY 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 along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.soa.esb.processors;
+
+import java.lang.reflect.Constructor;
+
+import javax.jms.Message;
+import javax.jms.TextMessage;
+
+import org.jboss.soa.esb.helpers.*;
+
+public class EsbMsgProcessor extends EsbAbstractProcessor
+{
+ public EsbMsgProcessor(DomElement p_oP) throws Exception
+ { super(p_oP,false);
+ } //__________________________________
+
+ protected void checkParms() throws Exception {}
+ public void execute() throws Exception {}
+
+ public void processMessage(Message p_oMsg) throws Exception
+ {
+ String sPrc = this.getClass().getName();
+ sPrc = sPrc.substring(1+sPrc.lastIndexOf("."));
+
+ StringBuffer sb = new StringBuffer("Message ");
+ if (p_oMsg instanceof TextMessage)
+ sb.append("<").append(((TextMessage)p_oMsg).getText()).append("> ");
+ String sNotifMsg = sb.toString();
+
+ sb.setLength(0);
+ try
+ {
+ try
+ { Class oCls = Class.forName(m_oParms.getAttr("actionClass"));
+ Constructor oCns = oCls.getConstructor(new Class[] {Message.class,EsbAbstractProcessor.class});
+ oCns.newInstance(new Object[] {p_oMsg,this});
+
+ super.postProcess();
+
+ sb.append(sPrc).append(" processed ").append(sNotifMsg).append(" successfully");
+ super.notifyOK(sb.toString());
+ }
+ catch (Exception e)
+ { m_oLogger.fatal("Message processor FAILED",e);
+ throw e;
+ }
+ finally { super.release(); }
+ }
+
+ catch (Exception eGen)
+ {
+ System.out.println("test catch for rollback here..");
+ super.notifyError(eGen," " + sPrc+" PROBLEMS processing "+sNotifMsg);
+ throw eGen;
+ }
+ }//_________________________
+
+} //____________________________________________________________________________
More information about the jboss-svn-commits
mailing list