Author: clebert.suconic(a)jboss.com
Date: 2012-02-20 17:01:15 -0500 (Mon, 20 Feb 2012)
New Revision: 12149
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
small tweaks only
Modified: trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java 2012-02-20
20:43:28 UTC (rev 12148)
+++
trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java 2012-02-20
22:01:15 UTC (rev 12149)
@@ -18,6 +18,7 @@
import org.hornetq.api.core.Interceptor;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.loadbalance.ConnectionLoadBalancingPolicy;
+import org.hornetq.core.client.impl.Topology;
/**
* A ServerLocator
@@ -623,7 +624,15 @@
* Closes this factory and release all its resources
*/
void close();
+
+ /**
+ * Exposes the Topology used by this ServerLocator.
+ * @return
+ */
+ Topology getTopology();
+
+
boolean isHA();
boolean isCompressLargeMessage();
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java 2012-02-20
20:43:28 UTC (rev 12148)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ServerLocatorInternal.java 2012-02-20
22:01:15 UTC (rev 12149)
@@ -74,6 +74,4 @@
boolean isBackup();
void setBackup(boolean backup);
-
- Topology getTopology();
}
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
---
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-20
20:43:28 UTC (rev 12148)
+++
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-02-20
22:01:15 UTC (rev 12149)
@@ -378,46 +378,45 @@
test.run();
}
- if (!configuration.isBackup())
+ if (configuration.isBackup())
{
- if (configuration.isSharedStore() &&
configuration.isPersistenceEnabled())
- {
- activation = new SharedStoreLiveActivation();
- }
- else
- {
- activation = new NoSharedStoreLiveActivation();
- }
+ if (configuration.isSharedStore())
+ {
+ activation = new SharedStoreBackupActivation();
+ }
+ else
+ {
+ assert replicationEndpoint == null;
+ backupUpToDate = false;
+ replicationEndpoint = new ReplicationEndpoint(this,
shutdownOnCriticalIO);
+ activation = new SharedNothingBackupActivation();
+ }
- activation.run();
-
- started = true;
-
- HornetQServerImpl.log.info("HornetQ Server version " +
getVersion().getFullVersion() +
- " [" +
- nodeManager.getNodeId() +
- "]" +
- (this.identity != null ? " (" + identity
: ")") +
- " started");
+ backupActivationThread = new Thread(activation, "Activation for server
" + this);
+ backupActivationThread.start();
}
-
// The activation on fail-back may change the value of isBackup, for that reason
we are not using else here
- if (configuration.isBackup())
+ else
{
- if (configuration.isSharedStore())
- {
- activation = new SharedStoreBackupActivation();
- }
- else
- {
- assert replicationEndpoint == null;
- backupUpToDate = false;
- replicationEndpoint = new ReplicationEndpoint(this,
shutdownOnCriticalIO);
- activation = new SharedNothingBackupActivation();
- }
+ if (configuration.isSharedStore() &&
configuration.isPersistenceEnabled())
+ {
+ activation = new SharedStoreLiveActivation();
+ }
+ else
+ {
+ activation = new NoSharedStoreLiveActivation();
+ }
- backupActivationThread = new Thread(activation, "Activation for server
" + this);
- backupActivationThread.start();
+ activation.run();
+
+ started = true;
+
+ HornetQServerImpl.log.info("HornetQ Server version " +
getVersion().getFullVersion() +
+ " [" +
+ nodeManager.getNodeId() +
+ "]" +
+ (this.identity != null ? " (" +
identity : ")") +
+ " started");
}
// start connector service
Show replies by date