[
http://jira.jboss.com/jira/browse/JBAS-4204?page=all ]
Adrian Brock closed JBAS-4204.
------------------------------
Fix Version/s: JBossAS-5.0.0.Beta2
JBossAS-4.2.0.GA
JBossAS-4.0.5.SP1
Resolution: Done
This has been fixed.
A new test has been added to the testsuite:
org.jboss.test.jbossmq.test.UnsubscribeWhileActiveUnitTestCase
Don't allow removal of durable topic subscriptions when there are
active subscribers or unacknowledged messages
---------------------------------------------------------------------------------------------------------------
Key: JBAS-4204
URL:
http://jira.jboss.com/jira/browse/JBAS-4204
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JMS service
Affects Versions: JBossAS-4.0.3 SP1, JBossAS-4.0.5.GA, JBossAS-4.0.4.GA
Reporter: Scott M Stark
Assigned To: Adrian Brock
Fix For: JBossAS-5.0.0.Beta2, JBossAS-4.2.0.GA, JBossAS-4.0.5.SP1
According to the spec, it is an application error to unsubscribe a Durable Topic
Subscription
when there is an active subscriber or there are unacknowledged messages/uncommitted
transactions for the subscription.
We don't currently check for this condition, except that it can lead to an NPE
if somebody does it which will then might also leave the state manager in an inconsistent
state
(it can only be fixed by rebooting).
Since this is an application error, the application should receive an error
(javax.jms.IllegalStateException) if it is tried.
It should not lead to corrupted server state.
The code already exists for this (related to disallowing the deletion of temporary queues
with
active subscribers) so it is just a case of:
1) Updating the "inUse" check in BasicQueue to also look for unacknowledged
messages
(this also covers uncommitted transactions). This check also applies to temporary
queues/topics.
2) Adding the code to check "inUse" in JMSTopic.destroyDurableSubscription()
before doing the removeAllMessages().
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira