User: pra Date: 01/08/30 13:50:35 Modified: src/main/org/jboss/test/mdb/bean ExQueueBean.java Log: Changed bean to use setRollbackOnly instead of throwing exception. If DLQ handling do not work it will set JBoss in an endless loop... Revision Changes Path 1.2 +5 -14 jbosstest/src/main/org/jboss/test/mdb/bean/ExQueueBean.java Index: ExQueueBean.java =================================================================== RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/mdb/bean/ExQueueBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ExQueueBean.java 2001/03/07 07:54:56 1.1 +++ ExQueueBean.java 2001/08/30 20:50:35 1.2 @@ -35,7 +35,6 @@ public class ExQueueBean implements MessageDrivenBean, MessageListener{ private MessageDrivenContext ctx = null; - static int throwex = 1; public ExQueueBean() { } @@ -49,20 +48,12 @@ public void ejbRemove() {ctx=null;} public void onMessage(Message message) { - /* - if (message.toString().equals("TextMessage@Queue Message queue/ex nr 1") || - message.toString().equals("TextMessage@Queue Message queue/ex nr 3")) - { - */ - throwex++; - if (throwex%2==0) { - - System.err.println("DEBUG: ExQueueBean throwing EJBException for message" + message.toString() ); - System.err.println("throwex " + throwex); - throw new EJBException(); - } - System.err.println("DEBUG: ExQueueBean got message " + message.toString() ); + + System.err.println("DEBUG: ExQueueBean rolling back transaction" + message.toString() ); + ctx.setRollbackOnly(); + } } // MessageBeanImpl + _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development