Author: clebert.suconic(a)jboss.com
Date: 2010-12-28 17:33:12 -0500 (Tue, 28 Dec 2010)
New Revision: 10083
Modified:
trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
Log:
small tweak
Modified: trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java
===================================================================
--- trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-28 17:44:00 UTC
(rev 10082)
+++ trunk/tests/joram-tests/src/org/hornetq/jms/HornetQAdmin.java 2010-12-28 22:33:12 UTC
(rev 10083)
@@ -59,6 +59,8 @@
private Process serverProcess;
private ClientSessionFactory sf;
+
+ ServerLocator serverLocator;
public HornetQAdmin()
{
@@ -78,7 +80,7 @@
public void start() throws Exception
{
- ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName()));
+ serverLocator = HornetQClient.createServerLocatorWithoutHA(new
TransportConfiguration(NettyConnectorFactory.class.getName()));
sf = serverLocator.createSessionFactory();
clientSession = sf.createSession(ConfigurationImpl.DEFAULT_CLUSTER_USER,
ConfigurationImpl.DEFAULT_CLUSTER_PASSWORD,
@@ -99,6 +101,14 @@
{
sf.close();
}
+
+ if (serverLocator != null)
+ {
+ serverLocator.close();
+ }
+
+ sf = null;
+ serverLocator = null;
}
public void createConnectionFactory(final String name)
Show replies by date