]
Yong Hao Gao updated JBMESSAGING-1919:
--------------------------------------
Fix Version/s: 1.4.0.SP3.CP15
1.4.8.SP7
Affects Version/s: 1.4.8.SP6
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, 1.4.8.SP6
Reporter: Toshiya Kobayashi
Assignee: Yong Hao Gao
Fix For: 1.4.0.SP3.CP15, 1.4.8.SP7
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/j...
{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: