[jboss-jira] [JBoss JIRA] (JBMESSAGING-1919) Publisher doesn't get JMSException even if database (JMS persistence) is down
Yong Hao Gao (JIRA)
jira-events at lists.jboss.org
Wed Mar 21 23:17:47 EDT 2012
[ https://issues.jboss.org/browse/JBMESSAGING-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yong Hao Gao reassigned JBMESSAGING-1919:
-----------------------------------------
Assignee: Yong Hao Gao
> Publisher doesn't get JMSException even if database (JMS persistence) is down
> -----------------------------------------------------------------------------
>
> Key: JBMESSAGING-1919
> URL: https://issues.jboss.org/browse/JBMESSAGING-1919
> Project: JBoss Messaging
> Issue Type: Bug
> Components: Messaging Core
> Affects Versions: 1.4.8.SP5
> Reporter: Toshiya Kobayashi
> Assignee: Yong Hao Gao
>
> In case of Topic (PERSISTENT mode, Durable Subscriber), Publisher doesn't get JMSException even if database (JMS persistence) is down. Attached a reproducer.
> How to reproduce:
> JBoss 5.1.1
> - configure MySQL as JMS persistence manager
> - unzip jms-publisher-subscriber.zip
> - edit build.properties for your local env
> - copy test-destination-service.xml to deploy dir
> - (terminal 1) ant subscriber
> - (terminal 2) ant publisher
> - stop MySQL
> -- Subscriber fails. But Publisher keeps running though database is down
> JBoss logs an error message in ChannelSupport.
> {noformat}
> 21:37:47,292 ERROR [ChannelSupport] Failed to handle message
> org.jboss.util.NestedSQLException: Unable to get managed connection for DefaultDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for DefaultDS)
> {noformat}
> But doesn't throw a JMSException. On the other hand, it throws a JMSException in case of Queue.
> See: ServerConnectionEndpoint
> {code:java}
> boolean sendMessage(JBossMessage msg, Transaction tx, boolean checkForDuplicates) throws Exception
> {
> ...
> else if (dest.isQueue())
> {
> if (trace) { log.trace(this + " routing " + msg + " to queue"); }
> if (!postOffice.route(ref, new JMSCondition(true, dest.getName()), tx))
> {
> throw new JMSException("Failed to route " + ref + " to " + dest.getName());
> }
> }
> else
> {
> if (trace) { log.trace(this + " routing " + msg + " to postoffice"); }
> postOffice.route(ref, new JMSCondition(false, dest.getName()), tx);
> }
> if (trace) { log.trace("sent " + msg); }
> return true;
> }
> {code}
> This logic is written in revision 1237. But there is no reason to avoid throwing JMS Exception for Topic?
> https://source.jboss.org/browse/JBossMessaging/trunk/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java?r1=1197&r2=1237&u=3
> {noformat}
> ------------------------------------------------------------------------
> r1237 | timfox | 2006-08-31 03:36:36 +0900 (Thu, 31 Aug 2006) | 4 lines
> Initial commit for clustering
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list