Author: clebert.suconic(a)jboss.com
Date: 2011-07-30 15:02:39 -0400 (Sat, 30 Jul 2011)
New Revision: 11076
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/api/core/client/ServerLocator.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
tweaks for tests
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/api/core/client/ServerLocator.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/api/core/client/ServerLocator.java 2011-07-30
18:57:05 UTC (rev 11075)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/api/core/client/ServerLocator.java 2011-07-30
19:02:39 UTC (rev 11076)
@@ -26,6 +26,12 @@
*/
public interface ServerLocator
{
+
+ /**
+ * Returns true if close was already called
+ * @return
+ */
+ boolean isClosed();
/**
* This method will disable any checks when a GarbageCollection happens
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-30
18:57:05 UTC (rev 11075)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-07-30
19:02:39 UTC (rev 11076)
@@ -512,7 +512,7 @@
public boolean isClosed()
{
- return closed;
+ return closed || serverLocator.isClosed();
}
public ServerLocator getServerLocator()
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-30
18:57:05 UTC (rev 11075)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-07-30
19:02:39 UTC (rev 11076)
@@ -546,6 +546,11 @@
addFactory(sf);
return sf;
}
+
+ public boolean isClosed()
+ {
+ return closed || closing;
+ }
public ClientSessionFactory createSessionFactory(final TransportConfiguration
transportConfiguration) throws Exception
{
Show replies by date