Bugs item #610907, was opened at 2002-09-18 03:28 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=610907&group_id=22866
Category: JBossMQ Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Elias Ross (genman) Assigned to: Nobody/Anonymous (nobody) Summary: Using JMS in MDB/container-managed TX Initial Comment: I've gotten MDB to work correctly with rolling-back the database when I call mdc.setRollbackOnly(). However, I don't know how to create a QueueSession/Sender which will send its messages after the onMessage() method exists. I have bought the JBoss documentation, but it does not have an example of this case specifically. I suspect (but do not know) that JBoss does not support automatic QueueSession commit after an MDB exits its onMessage method. Looking at the source after a few hours has gotten me confused. I suspect this is NOT supported, if it is supported, please forgive this bug submission and point me in the right direction. This _should_ be documented, at least document how this is correctly done. The JMS tutorial: http://java.sun.com/products/jms/tutorial/ has several examples of Container-managed TX for MDB, which don't seem to work in JBoss. Does anyone have an example of this sending out messages: public class MessageDrivenBean implements MessageListener { // Container-managed transactions with Required // transaction attribute public void onMessage(...) { try { QueueConnection qc = qcf.createQueueConnection(); QueueSession qs = qc.createQueueSession(true, 0); QueueSender qsend = qs.createQueueSender("queue/A"); TextMessage m = qs.createTextMessage(); m.setText("test"); qsend.send(m); /* qs.close(); // JMS javadoc says this rollbacks // In any case, doesn't seem to work */ qc.close(); } catch (Exception e) { e.printStackTrace(); } } } ---------------------------------------------------------------------- Comment By: Corby (corby) Date: 2002-09-18 14:07 Message: Logged In: YES user_id=25032 Your bug submission is correct, Elias. This has been a long- standing and frustrating issue with JBoss. MDB's with container-managed transactions do not seem to have the same transactional semantics as other EJB's, and you MUST use bean-managed transactions if you want to enlist mutiple resources in an MDB transaction. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=610907&group_id=22866 ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
