[jboss-cvs] JBoss Messaging SVN: r6495 - trunk/examples/jms/jmx/src/org/jboss/jms/example.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Apr 20 09:02:03 EDT 2009
Author: jmesnil
Date: 2009-04-20 09:02:03 -0400 (Mon, 20 Apr 2009)
New Revision: 6495
Modified:
trunk/examples/jms/jmx/src/org/jboss/jms/example/JMXExample.java
Log:
removed duplicated code
* JNDI context is closed in the finally block
Modified: trunk/examples/jms/jmx/src/org/jboss/jms/example/JMXExample.java
===================================================================
--- trunk/examples/jms/jmx/src/org/jboss/jms/example/JMXExample.java 2009-04-20 12:53:50 UTC (rev 6494)
+++ trunk/examples/jms/jmx/src/org/jboss/jms/example/JMXExample.java 2009-04-20 13:02:03 UTC (rev 6495)
@@ -130,13 +130,11 @@
TextMessage messageReceived = (TextMessage)messageConsumer.receive(5000);
System.out.println("Received message: " + messageReceived);
- initialContext.close();
-
return true;
}
finally
{
- // Step 20. Be sure to close our JMS resources!
+ // Step 20. Be sure to close the resources!
if (initialContext != null)
{
initialContext.close();
More information about the jboss-cvs-commits
mailing list