Hi Guys, I've configured JMS to use JDBC persistence and I send JMS messages in DUPS_OK_ACKNOWLEDGE mode to make sure that the messages are guaranteed. I use the following code to enforce this when I send the message.
queueConnection.createQueueSession(true, Session.DUPS_OK_ACKNOWLEDGE); queueSender.setDeliveryMode(DeliveryMode.PERSISTENT); The deployment descriptor for my Message Driven Bean is as follows: <message-driven > <description><![CDATA[This is reponsible for prioritising requests and dispatching them accordingly.]]></description> <ejb-name>QueueDispatcherMDBBean</ejb-name> <ejb-class>com.pindartech.imageprocessing.manager.queuemanager.QueueDispatcherBean</ejb-class> <message-selector></message-selector> <transaction-type>Container</transaction-type> <acknowledge-mode>Dups-ok-acknowledge</acknowledge-mode> <message-driven-destination> <destination-type>javax.jms.Queue</destination-type> </message-driven-destination> </message-driven> I have absolutely no complains in this configuration and it works fine when things happen normally. But when I abruptly bounce JBoss using (Ctrl + C) and restart it again, some times (not always), I tend to loose one JMS message per abrupt restart. Since I've configured in DUPS_OK_ACKNOWLEDGE mode, I expect app server to resend the notification even in exceptional scenarios. In my MDB, I do the following. public void onMessage(javax.jms.Message message) { try { // do the business... } catch(Exception e) { this.messageContext.setRollbackOnly(); } } Should I propagate the exception up the onMessage() call instead of just rolling back the Transaction in my MDB ? Is there another way to shutdown JBoss other then (Ctrl + C) so that abnormal scenarios in my application does not happen ? Your advice is much appreciated. Thanks in advance, Magesh ********************************************************************** This email and its attachments are intended for the above named only and may be confidential. If they have come to you in error, you must take no action based on them, nor must you copy or show them to anyone; please reply to this email and highlight the error. Security Warning: Please note that this email has been created in the knowledge that the internet email is not a 100% secure communications medium. We advise that you understand and observe this lack of security when emailing us. Viruses: Although we have taken steps to ensure that this email and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. If you have received this email in error please notify: [EMAIL PROTECTED] ********************************************************************** ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user