[jboss-cvs] JBoss Messaging SVN: r8249 - in branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851: src/main/org/jboss/jms/server/endpoint and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Apr 1 14:04:00 EDT 2011
Author: jbertram
Date: 2011-04-01 14:04:00 -0400 (Fri, 01 Apr 2011)
New Revision: 8249
Modified:
branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/
branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/tests/src/org/jboss/test/messaging/jms/TopicTest.java
Log:
JBPAPP-5935
Property changes on: branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/Branch_1_4:8013,8238,8245
+ /branches/Branch_1_4:8010,8013,8238,8245
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2011-04-01 17:48:37 UTC (rev 8248)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2011-04-01 18:04:00 UTC (rev 8249)
@@ -35,6 +35,7 @@
import org.jboss.jms.server.selector.Selector;
import org.jboss.jms.wireformat.Dispatcher;
import org.jboss.logging.Logger;
+import org.jboss.messaging.core.contract.Binding;
import org.jboss.messaging.core.contract.Delivery;
import org.jboss.messaging.core.contract.DeliveryObserver;
import org.jboss.messaging.core.contract.Message;
@@ -539,8 +540,13 @@
ServerPeer sp = sessionEndpoint.getConnectionEndpoint().getServerPeer();
- Queue queue = postOffice.getBindingForQueueName(queueName).queue;
+ Binding binding = postOffice.getBindingForQueueName(queueName);
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-1801
+ if (binding == null) return;
+
+ Queue queue = binding.queue;
+
ManagedDestination mDest = sp.getDestinationManager().getDestination(destination.getName(), false);
if (!queue.isRecoverable())
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/tests/src/org/jboss/test/messaging/jms/TopicTest.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/tests/src/org/jboss/test/messaging/jms/TopicTest.java 2011-04-01 17:48:37 UTC (rev 8248)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP09_JBMESSAGING-1805_JBMESSAGING-1851/tests/src/org/jboss/test/messaging/jms/TopicTest.java 2011-04-01 18:04:00 UTC (rev 8249)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.messaging.jms;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
import java.io.Serializable;
import javax.jms.Connection;
@@ -34,6 +36,8 @@
import javax.jms.TextMessage;
import javax.jms.Topic;
+import org.jboss.test.messaging.tools.ServerManagement;
+
/**
* @author <a href="mailto:ovidiu at feodorov.com">Ovidiu Feodorov</a>
* @version <tt>$Revision$</tt>
@@ -158,6 +162,43 @@
}
}
+ //https://jira.jboss.org/jira/browse/JBMESSAGING-1801
+ //Note: This test need manual examination in the console log!
+ //reason: The NullPointerException occurs at consumer.close().
+ //At the server side stack trace will be printed out but
+ //at the client side the interceptor just swallows the exception!
+ //so there is no exception occurring at client side, making
+ //this test appear to be passed.
+ public void testTopicNonDurableSubShutdown() throws Exception
+ {
+ Connection conn = null;
+
+ try
+ {
+ ServerManagement.deployTopic("Topic2010Apr22");
+ Topic theTopic = (Topic)ic.lookup("/topic/Topic2010Apr22");
+ conn = cf.createConnection();
+
+ Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageConsumer consumer = s.createConsumer(theTopic);
+
+ ServerManagement.undeployTopic("Topic2010Apr22");
+
+ ByteArrayOutputStream bstream = new ByteArrayOutputStream();
+
+ System.setErr(new PrintStream(bstream));
+
+ consumer.close();
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ }
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
More information about the jboss-cvs-commits
mailing list