JBoss hornetq SVN: r12263 - in trunk/hornetq-core/src/main/java/org/hornetq: core/client/impl and 2 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-08 11:04:45 -0500 (Thu, 08 Mar 2012)
New Revision: 12263
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/Topology.java
trunk/hornetq-core/src/main/java/org/hornetq/core/messagecounter/MessageCounter.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
Fix javadoc warnings
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-03-08 10:49:15 UTC (rev 12262)
+++ trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/ServerLocator.java 2012-03-08 16:04:45 UTC (rev 12263)
@@ -38,19 +38,19 @@
* This method will disable any checks when a GarbageCollection happens
* leaving connections open. The JMS Layer will make specific usage of this
* method, since the ConnectionFactory.finalize should release this.
- *
+ *
* Warning: You may leave resources unattended if you call this method and
* don't take care of cleaning the resources yourself.
*/
void disableFinalizeCheck();
-
+
/**
* Create a ClientSessionFactory using whatever load balancing policy is in force
* @return The ClientSessionFactory
* @throws Exception
*/
ClientSessionFactory createSessionFactory() throws Exception;
-
+
/**
* Create a ClientSessionFactory to a specific server. The server must already be known about by this ServerLocator.
* This method allows the user to make a connection to a specific server bypassing any load balancing policy in force
@@ -59,7 +59,7 @@
* @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know about the passed in transportConfiguration
*/
ClientSessionFactory createSessionFactory(final String nodeID) throws Exception;
-
+
/**
* Create a ClientSessionFactory to a specific server. The server must already be known about by this ServerLocator.
* This method allows the user to make a connection to a specific server bypassing any load balancing policy in force
@@ -68,21 +68,21 @@
* @throws Exception if a failure happened in creating the ClientSessionFactory or the ServerLocator does not know about the passed in transportConfiguration
*/
ClientSessionFactory createSessionFactory(final TransportConfiguration transportConfiguration) throws Exception;
-
+
/**
* Returns the period used to check if a client has failed to receive pings from the server.
- *
+ *
* Period is in milliseconds, default value is {@link HornetQClient#DEFAULT_CLIENT_FAILURE_CHECK_PERIOD}.
- *
+ *
* @return the period used to check if a client has failed to receive pings from the server
*/
long getClientFailureCheckPeriod();
/**
* Sets the period (in milliseconds) used to check if a client has failed to receive pings from the server.
- *
+ *
* Value must be -1 (to disable) or greater than 0.
- *
+ *
* @param clientFailureCheckPeriod the period to check failure
*/
void setClientFailureCheckPeriod(long clientFailureCheckPeriod);
@@ -101,7 +101,7 @@
/**
* Sets whether large messages received by consumers created through this factory will be cached in temporary files or not.
- *
+ *
* @param cached <code>true</code> to cache large messages in temporary files, <code>false</code> else
*/
void setCacheLargeMessagesClient(boolean cached);
@@ -109,18 +109,18 @@
/**
* Returns the connection <em>time-to-live</em>.
* This TTL determines how long the server will keep a connection alive in the absence of any data arriving from the client.
- *
+ *
* Value is in milliseconds, default value is {@link HornetQClient#DEFAULT_CONNECTION_TTL}.
- *
+ *
* @return the connection time-to-live in milliseconds
*/
long getConnectionTTL();
/**
* Sets this factory's connections <em>time-to-live</em>.
- *
+ *
* Value must be -1 (to disable) or greater or equals to 0.
- *
+ *
* @param connectionTTL period in milliseconds
*/
void setConnectionTTL(long connectionTTL);
@@ -173,18 +173,18 @@
/**
* Sets the large message size threshold.
- *
+ *
* Value must be greater than 0.
- *
+ *
* @param minLargeMessageSize large message size threshold in bytes
*/
void setMinLargeMessageSize(int minLargeMessageSize);
/**
* Returns the window size for flow control of the consumers created through this factory.
- *
+ *
* Value is in bytes, default value is {@link HornetQClient#DEFAULT_CONSUMER_WINDOW_SIZE}.
- *
+ *
* @return the window size used for consumer flow control
*/
int getConsumerWindowSize();
@@ -200,37 +200,37 @@
/**
* Returns the maximum rate of message consumption for consumers created through this factory.
- *
+ *
* This value controls the rate at which a consumer can consume messages. A consumer will never consume messages at a rate faster than the rate specified.
- *
+ *
* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
* Default value is {@link HornetQClient#DEFAULT_CONSUMER_MAX_RATE}.
- *
+ *
* @return the consumer max rate
*/
int getConsumerMaxRate();
/**
* Sets the maximum rate of message consumption for consumers created through this factory.
- *
+ *
* Value must -1 (to disable) or a positive integer corresponding to the maximum desired message consumption rate specified in units of messages per second.
- *
+ *
* @param consumerMaxRate maximum rate of message consumption (in messages per seconds)
*/
void setConsumerMaxRate(int consumerMaxRate);
/**
* Returns the size for the confirmation window of clients using this factory.
- *
+ *
* Value is in bytes or -1 (to disable the window). Default value is {@link HornetQClient#DEFAULT_CONFIRMATION_WINDOW_SIZE}.
- *
+ *
* @return the size for the confirmation window of clients using this factory
*/
int getConfirmationWindowSize();
/**
* Sets the size for the confirmation window buffer of clients using this factory.
- *
+ *
* Value must be -1 (to disable the window) or greater than 0.
* @param confirmationWindowSize size of the confirmation window (in bytes)
@@ -239,40 +239,40 @@
/**
* Returns the window size for flow control of the producers created through this factory.
- *
+ *
* Value must be -1 (to disable flow control) or greater than 0 to determine the maximum amount of bytes at any give time (to prevent overloading the connection).
* Default value is {@link HornetQClient#DEFAULT_PRODUCER_WINDOW_SIZE}.
- *
+ *
* @return the window size for flow control of the producers created through this factory.
*/
int getProducerWindowSize();
/**
* Returns the window size for flow control of the producers created through this factory.
- *
+ *
* Value must be -1 (to disable flow control) or greater than 0.
- *
+ *
* @param producerWindowSize window size (in bytest) for flow control of the producers created through this factory.
*/
void setProducerWindowSize(int producerWindowSize);
/**
* Returns the maximum rate of message production for producers created through this factory.
- *
+ *
* This value controls the rate at which a producer can produce messages. A producer will never produce messages at a rate faster than the rate specified.
- *
+ *
* Value is -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
* Default value is {@link HornetQClient#DEFAULT_PRODUCER_MAX_RATE}.
- *
+ *
* @return maximum rate of message production (in messages per seconds)
*/
int getProducerMaxRate();
/**
* Sets the maximum rate of message production for producers created through this factory.
- *
+ *
* Value must -1 (to disable) or a positive integer corresponding to the maximum desired message production rate specified in units of messages per second.
- *
+ *
* @param producerMaxRate maximum rate of message production (in messages per seconds)
*/
void setProducerMaxRate(int producerMaxRate);
@@ -280,9 +280,9 @@
/**
* Returns whether consumers created through this factory will block while
* sending message acknowledgments or do it asynchronously.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_ACKNOWLEDGE}.
- *
+ *
* @return whether consumers will block while sending message
* acknowledgments or do it asynchronously
*/
@@ -291,7 +291,7 @@
/**
* Sets whether consumers created through this factory will block while
* sending message acknowledgments or do it asynchronously.
- *
+ *
* @param blockOnAcknowledge
* <code>true</code> to block when sending message
* acknowledgments or <code>false</code> to send them
@@ -304,7 +304,7 @@
* <br>
* If the session is configured to send durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
* to be notified once the message has been handled by the server.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_DURABLE_SEND}.
*
* @return whether producers will block while sending persistent messages or do it asynchronously
@@ -313,7 +313,7 @@
/**
* Sets whether producers created through this factory will block while sending <em>durable</em> messages or do it asynchronously.
- *
+ *
* @param blockOnDurableSend <code>true</code> to block when sending durable messages or <code>false</code> to send them asynchronously
*/
void setBlockOnDurableSend(boolean blockOnDurableSend);
@@ -323,7 +323,7 @@
* <br>
* If the session is configured to send non-durable message asynchronously, the client can set a SendAcknowledgementHandler on the ClientSession
* to be notified once the message has been handled by the server.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_BLOCK_ON_NON_DURABLE_SEND}.
*
* @return whether producers will block while sending non-durable messages or do it asynchronously
@@ -332,7 +332,7 @@
/**
* Sets whether producers created through this factory will block while sending <em>non-durable</em> messages or do it asynchronously.
- *
+ *
* @param blockOnNonDurableSend <code>true</code> to block when sending non-durable messages or <code>false</code> to send them asynchronously
*/
void setBlockOnNonDurableSend(boolean blockOnNonDurableSend);
@@ -340,11 +340,11 @@
/**
* Returns whether producers created through this factory will automatically
* assign a group ID to the messages they sent.
- *
+ *
* if <code>true</code>, a random unique group ID is created and set on each message for the property
* {@link org.hornetq.api.core.Message#HDR_GROUP_ID}.
* Default value is {@link HornetQClient#DEFAULT_AUTO_GROUP}.
- *
+ *
* @return whether producers will automatically assign a group ID to their messages
*/
boolean isAutoGroup();
@@ -352,23 +352,23 @@
/**
* Sets whether producers created through this factory will automatically
* assign a group ID to the messages they sent.
- *
+ *
* @param autoGroup <code>true</code> to automatically assign a group ID to each messages sent through this factory, <code>false</code> else
*/
void setAutoGroup(boolean autoGroup);
/**
* Returns the group ID that will be eventually set on each message for the property {@link org.hornetq.api.core.Message#HDR_GROUP_ID}.
- *
+ *
* Default value is is <code>null</code> and no group ID will be set on the messages.
- *
+ *
* @return the group ID that will be eventually set on each message
*/
String getGroupID();
-
+
/**
* Sets the group ID that will be set on each message sent through this factory.
- *
+ *
* @param groupID the group ID to use
*/
void setGroupID(String groupID);
@@ -384,7 +384,7 @@
* Sets to <code>true</code> to pre-acknowledge consumed messages on the
* server before they are sent to consumers, else set to <code>false</code>
* to let clients acknowledge the message they consume.
- *
+ *
* @param preAcknowledge
* <code>true</code> to enable pre-acknowledgment,
* <code>false</code> else
@@ -393,27 +393,27 @@
/**
* Returns the acknowledgments batch size.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_ACK_BATCH_SIZE}.
- *
+ *
* @return the acknowledgments batch size
*/
int getAckBatchSize();
/**
* Sets the acknowledgments batch size.
- *
+ *
* Value must be equal or greater than 0.
- *
+ *
* @param ackBatchSize
* acknowledgments batch size
*/
void setAckBatchSize(int ackBatchSize);
/**
- * Returns an array of TransportConfigurations representing the static list of live servers used when
- * creating this object
- * @return
+ * Returns an array of TransportConfigurations representing the static list of live servers used
+ * when creating this object
+ * @return array with all static {@link TransportConfiguration}s
*/
TransportConfiguration[] getStaticTransportConfigurations();
@@ -425,9 +425,9 @@
/**
* Returns whether this factory will use global thread pools (shared among all the factories in the same JVM)
* or its own pools.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_USE_GLOBAL_POOLS}.
- *
+ *
* @return <code>true</code> if this factory uses global thread pools, <code>false</code> else
*/
boolean isUseGlobalPools();
@@ -435,90 +435,90 @@
/**
* Sets whether this factory will use global thread pools (shared among all the factories in the same JVM)
* or its own pools.
- *
+ *
* @param useGlobalPools <code>true</code> to let this factory uses global thread pools, <code>false</code> else
*/
void setUseGlobalPools(boolean useGlobalPools);
/**
* Returns the maximum size of the scheduled thread pool.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE}.
- *
+ *
* @return the maximum size of the scheduled thread pool.
*/
int getScheduledThreadPoolMaxSize();
/**
* Sets the maximum size of the scheduled thread pool.
- *
+ *
* This setting is relevant only if this factory does not use global pools.
* Value must be greater than 0.
- *
+ *
* @param scheduledThreadPoolMaxSize maximum size of the scheduled thread pool.
*/
void setScheduledThreadPoolMaxSize(int scheduledThreadPoolMaxSize);
/**
* Returns the maximum size of the thread pool.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_THREAD_POOL_MAX_SIZE}.
- *
+ *
* @return the maximum size of the thread pool.
*/
int getThreadPoolMaxSize();
/**
* Sets the maximum size of the thread pool.
- *
+ *
* This setting is relevant only if this factory does not use global pools.
* Value must be -1 (for unlimited thread pool) or greater than 0.
- *
+ *
* @param threadPoolMaxSize maximum size of the thread pool.
*/
void setThreadPoolMaxSize(int threadPoolMaxSize);
/**
- * Returns the time to retry connections created by this factory after failure.
- *
+ * Returns the time to retry connections created by this factory after failure.
+ *
* Value is in milliseconds, default is {@link HornetQClient#DEFAULT_RETRY_INTERVAL}.
- *
+ *
* @return the time to retry connections created by this factory after failure
*/
long getRetryInterval();
/**
* Sets the time to retry connections created by this factory after failure.
- *
+ *
* Value must be greater than 0.
- *
- * @param retryInterval time (in milliseconds) to retry connections created by this factory after failure
+ *
+ * @param retryInterval time (in milliseconds) to retry connections created by this factory after failure
*/
void setRetryInterval(long retryInterval);
/**
* Returns the multiplier to apply to successive retry intervals.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_RETRY_INTERVAL_MULTIPLIER}.
- *
+ *
* @return the multiplier to apply to successive retry intervals
*/
double getRetryIntervalMultiplier();
/**
* Sets the multiplier to apply to successive retry intervals.
- *
+ *
* Value must be positive.
- *
+ *
* @param retryIntervalMultiplier multiplier to apply to successive retry intervals
*/
void setRetryIntervalMultiplier(double retryIntervalMultiplier);
/**
* Returns the maximum retry interval (in the case a retry interval multiplier has been specified).
- *
+ *
* Value is in milliseconds, default value is {@link HornetQClient#DEFAULT_MAX_RETRY_INTERVAL}.
- *
+ *
* @return the maximum retry interval
*/
long getMaxRetryInterval();
@@ -534,18 +534,18 @@
/**
* Returns the maximum number of attempts to retry connection in case of failure.
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_RECONNECT_ATTEMPTS}.
- *
+ *
* @return the maximum number of attempts to retry connection in case of failure.
*/
int getReconnectAttempts();
/**
* Sets the maximum number of attempts to retry connection in case of failure.
- *
+ *
* Value must be -1 (to retry infinitely), 0 (to never retry connection) or greater than 0.
- *
+ *
* @param reconnectAttempts maximum number of attempts to retry connection in case of failure
*/
void setReconnectAttempts(int reconnectAttempts);
@@ -556,66 +556,66 @@
/**
* Returns true if the client will automatically attempt to connect to the backup server if the initial
* connection to the live server fails
- *
+ *
* Default value is {@link HornetQClient#DEFAULT_FAILOVER_ON_INITIAL_CONNECTION}.
*/
boolean isFailoverOnInitialConnection();
-
+
/**
* Sets the value for FailoverOnInitialReconnection
- *
+ *
* @param failover
*/
void setFailoverOnInitialConnection(boolean failover);
/**
* Returns the class name of the connection load balancing policy.
- *
+ *
* Default value is "org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy".
- *
+ *
* @return the class name of the connection load balancing policy
*/
String getConnectionLoadBalancingPolicyClassName();
/**
* Sets the class name of the connection load balancing policy.
- *
+ *
* Value must be the name of a class implementing {@link ConnectionLoadBalancingPolicy}.
- *
+ *
* @param loadBalancingPolicyClassName class name of the connection load balancing policy
*/
void setConnectionLoadBalancingPolicyClassName(String loadBalancingPolicyClassName);
/**
* Returns the initial size of messages created through this factory.
- *
+ *
* Value is in bytes, default value is {@link HornetQClient#DEFAULT_INITIAL_MESSAGE_PACKET_SIZE}.
- *
+ *
* @return the initial size of messages created through this factory
*/
int getInitialMessagePacketSize();
/**
* Sets the initial size of messages created through this factory.
- *
+ *
* Value must be greater than 0.
- *
+ *
* @param size initial size of messages created through this factory.
*/
void setInitialMessagePacketSize(int size);
-
+
/**
* Adds an interceptor which will be executed <em>after packets are received from the server</em>.
- *
+ *
* @param interceptor an Interceptor
*/
void addInterceptor(Interceptor interceptor);
/**
* Removes an interceptor.
- *
+ *
* @param interceptor interceptor to remove
- *
+ *
* @return <code>true</code> if the interceptor is removed from this factory, <code>false</code> else
*/
boolean removeInterceptor(Interceptor interceptor);
@@ -624,19 +624,17 @@
* Closes this factory and release all its resources
*/
void close();
-
/**
* Exposes the Topology used by this ServerLocator.
- * @return
+ * @return topology
*/
Topology getTopology();
-
boolean isHA();
-
+
boolean isCompressLargeMessage();
-
+
void setCompressLargeMessage(boolean compress);
void addClusterTopologyListener(ClusterTopologyListener listener);
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-08 10:49:15 UTC (rev 12262)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-08 16:04:45 UTC (rev 12263)
@@ -152,7 +152,7 @@
* time millis for starts, and a ++ of that number for shutdown.
* @param nodeId
* @param memberInput
- * @return
+ * @return {@code true} if an update did take place. Note that backups are *always* updated.
*/
public boolean updateMember(final long uniqueEventID, final String nodeId, final TopologyMember memberInput)
{
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/messagecounter/MessageCounter.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/messagecounter/MessageCounter.java 2012-03-08 10:49:15 UTC (rev 12262)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/messagecounter/MessageCounter.java 2012-03-08 16:04:45 UTC (rev 12263)
@@ -83,14 +83,13 @@
// Constructors --------------------------------------------------
/**
- * Constructor
- *
- * @param name destination name
- * @param subscription subscription name
- * @param queue internal queue object
- * @param topic topic destination flag
- * @param durable durable subsciption flag
- * @param daycountmax max message history day count
+ * Constructor
+ * @param name destination name
+ * @param subscription subscription name
+ * @param serverQueue internal queue object
+ * @param topic topic destination flag
+ * @param durable durable subscription flag
+ * @param daycountmax max message history day count
*/
public MessageCounter(final String name,
final String subscription,
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java 2012-03-08 10:49:15 UTC (rev 12262)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java 2012-03-08 16:04:45 UTC (rev 12263)
@@ -76,10 +76,10 @@
import org.hornetq.utils.json.JSONObject;
/*
- * Session implementation
- *
- * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- * @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
+ * Session implementation
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ * @author <a href="mailto:clebert.suconic@jboss.com">Clebert Suconic</a>
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
* @author <a href="mailto:andy.taylor@jboss.org>Andy Taylor</a>
*/
@@ -421,7 +421,7 @@
/**
* For test cases only
- * @return
+ * @return RemotingConnection
*/
public RemotingConnection getRemotingConnection()
{
@@ -587,7 +587,7 @@
public void acknowledge(final long consumerID, final long messageID) throws Exception
{
ServerConsumer consumer = consumers.get(consumerID);
-
+
if (consumer == null)
{
throw new HornetQException(HornetQException.ILLEGAL_STATE, "Consumer " + consumerID + " wasn't created on the server");
@@ -640,7 +640,7 @@
}
/**
- *
+ *
* @param clientFailed If the client has failed, we can't decrease the delivery-counts, and the close may issue a rollback
* @param considerLastMessageAsDelivered
* @throws Exception
@@ -1090,7 +1090,7 @@
return;
}
-
+
consumer.receiveCredits(credits);
}
@@ -1105,7 +1105,7 @@
{
log.trace("sendLarge::" + largeMsg);
}
-
+
if (currentLargeMessage != null)
{
ServerSessionImpl.log.warn("Replacing incomplete LargeMessage with ID=" + currentLargeMessage.getMessageID());
@@ -1117,7 +1117,7 @@
public void send(final ServerMessage message, final boolean direct) throws Exception
{
long id = storageManager.generateUniqueID();
-
+
SimpleString address = message.getAddress();
message.setMessageID(id);
@@ -1326,7 +1326,7 @@
// Public
// ----------------------------------------------------------------------------
-
+
public void clearLargeMessage()
{
currentLargeMessage = null;
12 years, 2 months
JBoss hornetq SVN: r12262 - in trunk: tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-08 05:49:15 -0500 (Thu, 08 Mar 2012)
New Revision: 12262
Modified:
trunk/.settings/de.loskutov.anyedit.AnyEditTools.prefs
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java
Log:
Fix: retryInterval should always be positive
Modified: trunk/.settings/de.loskutov.anyedit.AnyEditTools.prefs
===================================================================
--- trunk/.settings/de.loskutov.anyedit.AnyEditTools.prefs 2012-03-07 23:59:46 UTC (rev 12261)
+++ trunk/.settings/de.loskutov.anyedit.AnyEditTools.prefs 2012-03-08 10:49:15 UTC (rev 12262)
@@ -1,4 +1,4 @@
-#Wed Sep 17 15:35:39 BST 2008
+#Tue Oct 25 16:48:56 CEST 2011
activeContentFilterList=*.makefile,makefile,*.Makefile,Makefile,Makefile.*,*.mk,MANIFEST.MF
convertActionOnSaave=AnyEdit.CnvrtTabToSpaces
eclipse.preferences.version=1
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java 2012-03-07 23:59:46 UTC (rev 12261)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java 2012-03-08 10:49:15 UTC (rev 12262)
@@ -37,20 +37,6 @@
public class SecurityFailoverTest extends FailoverTest
{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
protected ClientSession createSession(ClientSessionFactory sf,
boolean isXA,
boolean autoCommitSends,
@@ -146,16 +132,9 @@
liveConfig.setSharedStore(true);
liveConfig.setClustered(true);
List<String> pairs = null;
- ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
- "jms",
- liveConnector.getName(),
- -1,
- false,
- false,
- 1,
- 1,
- pairs,
- false);
+ ClusterConnectionConfiguration ccc0 =
+ new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), 100, false, false, 1, 1,
+ pairs, false);
liveConfig.getClusterConfigurations().add(ccc0);
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
liveServer = createTestableServer(liveConfig);
12 years, 2 months
JBoss hornetq SVN: r12261 - in branches/Branch_2_2_EAP/src/main/org/hornetq: ra/recovery and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic
Date: 2012-03-07 18:59:46 -0500 (Wed, 07 Mar 2012)
New Revision: 12261
Added:
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQRegistryBase.java
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQResourceRecovery.java
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/RecoveryRegistry.java
branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/XARecoveryConfig.java
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java
Log:
JBPAPP-8366 & JBPAPP-8377 - fixing leaks and duplicated resources (commit first part)
Added: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQRegistryBase.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQRegistryBase.java (rev 0)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQRegistryBase.java 2012-03-07 23:59:46 UTC (rev 12261)
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2010 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.jms.server.recovery;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.hornetq.api.core.DiscoveryGroupConfiguration;
+import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.core.logging.Logger;
+import org.hornetq.jms.client.HornetQConnectionFactory;
+import org.jboss.tm.XAResourceRecoveryRegistry;
+
+/**
+ * This class is a base class for the integration layer where
+ * we verify if a given connection factory already have a recovery registered
+ *
+ * @author Clebert
+ * @author Andy Taylor
+ *
+ *
+ */
+public abstract class HornetQRegistryBase implements RecoveryRegistry
+{
+ // Constants -----------------------------------------------------
+
+ private static final Logger log = Logger.getLogger(HornetQRegistryBase.class);
+
+ // Attributes ----------------------------------------------------
+
+ private static Set<HornetQResourceRecovery> configSet = new HashSet<HornetQResourceRecovery>();
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ public abstract XAResourceRecoveryRegistry getTMRegistry();
+
+ public HornetQResourceRecovery register(final HornetQResourceRecovery resourceRecovery)
+ {
+ synchronized (configSet)
+ {
+ HornetQResourceRecovery usedInstance = locateSimilarResource(resourceRecovery);
+ if (usedInstance == null)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Adding " + resourceRecovery.getConfig() + " resource = " + resourceRecovery);
+ }
+ usedInstance = resourceRecovery;
+ configSet.add(usedInstance);
+ getTMRegistry().addXAResourceRecovery(usedInstance);
+ }
+ usedInstance.incrementUsage();
+ return usedInstance;
+ }
+ }
+
+
+
+ public synchronized void unRegister(final HornetQResourceRecovery resourceRecovery)
+ {
+ synchronized (configSet)
+ {
+ // The same resource could have been reused by more than one resource manager or factory
+ if (resourceRecovery.decrementUsage() == 0)
+ {
+ getTMRegistry().removeXAResourceRecovery(resourceRecovery);
+ }
+ }
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ private static HornetQResourceRecovery locateSimilarResource(HornetQResourceRecovery resourceInput)
+ {
+ HornetQConnectionFactory factory = resourceInput.getConfig().getFactory();
+
+ TransportConfiguration[] transportConfigurations = resourceInput.getConfig().getFactory().getServerLocator()
+ .getStaticTransportConfigurations();
+
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("############################################## looking for a place on " + Arrays.toString(transportConfigurations));
+ }
+
+ for (HornetQResourceRecovery resourceScan : configSet)
+ {
+ XARecoveryConfig xaRecoveryConfig = resourceScan.getConfig();
+
+ if (transportConfigurations != null)
+ {
+ TransportConfiguration[] xaConfigurations = xaRecoveryConfig.getHornetQConnectionFactory().getServerLocator()
+ .getStaticTransportConfigurations();
+
+ if (log.isTraceEnabled())
+ {
+ log.trace("Checking " + Arrays.toString(transportConfigurations) + " against " + Arrays.toString(xaConfigurations));
+ }
+
+ if (xaConfigurations == null)
+ {
+ continue;
+ }
+ if (transportConfigurations.length != xaConfigurations.length)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace(Arrays.toString(transportConfigurations) + " != " + Arrays.toString(xaConfigurations) + " because of size");
+ }
+ continue;
+ }
+ boolean theSame = true;
+ for (int i = 0; i < transportConfigurations.length; i++)
+ {
+ TransportConfiguration tc = transportConfigurations[i];
+ TransportConfiguration xaTc = xaConfigurations[i];
+ if (!tc.equals(xaTc))
+ {
+ log.info(Arrays.toString(transportConfigurations) + " != " + Arrays.toString(xaConfigurations) + " because of " + tc + " != " + xaTc);
+ theSame = false;
+ break;
+ }
+ }
+ if (theSame)
+ {
+ return resourceScan;
+ }
+ } else
+ {
+ DiscoveryGroupConfiguration discoveryGroupConfiguration = xaRecoveryConfig.getHornetQConnectionFactory()
+ .getServerLocator().getDiscoveryGroupConfiguration();
+ if (discoveryGroupConfiguration != null && discoveryGroupConfiguration.equals(factory.getDiscoveryGroupConfiguration()))
+ {
+ return resourceScan;
+ }
+ }
+ }
+
+ return null;
+
+ }
+
+ // Inner classes -------------------------------------------------
+
+}
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQResourceRecovery.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQResourceRecovery.java 2012-03-07 14:02:01 UTC (rev 12260)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/HornetQResourceRecovery.java 2012-03-07 23:59:46 UTC (rev 12261)
@@ -32,16 +32,39 @@
public class HornetQResourceRecovery implements XAResourceRecovery
{
private final XARecoveryConfig config;
+
+ private final XAResource[] xaResources;
+
+ private int usage;
public HornetQResourceRecovery(XARecoveryConfig config)
{
this.config = config;
+ this.xaResources = new XAResource[]{new HornetQXAResourceWrapper(config)};
}
public XAResource[] getXAResources()
{
- return new XAResource[]{new HornetQXAResourceWrapper(config)};
+ return xaResources;
}
+
+ public XARecoveryConfig getConfig()
+ {
+ return config;
+ }
+
+ /** we may have several connection factories referencing the same connection recovery entry.
+ * Because of that we need to make a count of the number of the instances that are referencing it,
+ * so we will remove it as soon as we are done */
+ public synchronized int incrementUsage()
+ {
+ return ++usage;
+ }
+
+ public synchronized int decrementUsage()
+ {
+ return --usage;
+ }
@Override
public boolean equals(Object o)
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/RecoveryRegistry.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/RecoveryRegistry.java 2012-03-07 14:02:01 UTC (rev 12260)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/RecoveryRegistry.java 2012-03-07 23:59:46 UTC (rev 12261)
@@ -28,7 +28,7 @@
*/
public interface RecoveryRegistry
{
- void register(HornetQResourceRecovery resourceRecovery);
+ HornetQResourceRecovery register(HornetQResourceRecovery resourceRecovery);
void unRegister(HornetQResourceRecovery xaRecoveryConfig);
}
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/XARecoveryConfig.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/XARecoveryConfig.java 2012-03-07 14:02:01 UTC (rev 12260)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/jms/server/recovery/XARecoveryConfig.java 2012-03-07 23:59:46 UTC (rev 12261)
@@ -16,6 +16,9 @@
import org.hornetq.jms.client.HornetQConnectionFactory;
/**
+ *
+ * This represents the configuration of a single connection factory.
+ *
* @author <a href="mailto:andy.taylor@jboss.com">Andy Taylor</a>
*
* A wrapper around info needed for the xa recovery resource
@@ -49,6 +52,11 @@
{
return password;
}
+
+ public HornetQConnectionFactory getFactory()
+ {
+ return hornetQConnectionFactory;
+ }
@Override
public boolean equals(Object o)
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2012-03-07 14:02:01 UTC (rev 12260)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2012-03-07 23:59:46 UTC (rev 12261)
@@ -21,18 +21,16 @@
*/
package org.hornetq.ra.recovery;
-import org.hornetq.api.core.DiscoveryGroupConfiguration;
-import org.hornetq.api.core.TransportConfiguration;
+import java.util.Set;
+
import org.hornetq.core.logging.Logger;
import org.hornetq.jms.client.HornetQConnectionFactory;
import org.hornetq.jms.server.recovery.HornetQResourceRecovery;
import org.hornetq.jms.server.recovery.RecoveryRegistry;
import org.hornetq.jms.server.recovery.XARecoveryConfig;
import org.hornetq.ra.Util;
+import org.hornetq.utils.ConcurrentHashSet;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
* 9/21/11
@@ -44,9 +42,9 @@
private RecoveryRegistry registry;
private String resourceRecoveryClassNames = "org.jboss.as.integration.hornetq.recovery.AS5RecoveryRegistry";
+
+ private final Set<HornetQResourceRecovery> resources = new ConcurrentHashSet<HornetQResourceRecovery>();
- private Map<XARecoveryConfig, HornetQResourceRecovery> configMap = new HashMap<XARecoveryConfig, HornetQResourceRecovery>();
-
public void start()
{
locateRecoveryRegistry();
@@ -56,15 +54,19 @@
{
log.debug("registering recovery for factory : " + factory);
- if(!isRegistered(factory) && registry != null)
+ XARecoveryConfig xaRecoveryConfig = new XARecoveryConfig(factory, userName, password);
+ HornetQResourceRecovery resourceRecovery = new HornetQResourceRecovery(xaRecoveryConfig);
+
+ if (registry != null)
{
- XARecoveryConfig xaRecoveryConfig = new XARecoveryConfig(factory, userName, password);
- HornetQResourceRecovery resourceRecovery = new HornetQResourceRecovery(xaRecoveryConfig);
- registry.register(resourceRecovery);
- configMap.put(xaRecoveryConfig, resourceRecovery);
- return resourceRecovery;
+ resourceRecovery = registry.register(resourceRecovery);
+ if (resourceRecovery != null)
+ {
+ resources.add(resourceRecovery);
+ }
}
- return null;
+
+ return resourceRecovery;
}
public void unRegister(HornetQResourceRecovery resourceRecovery)
@@ -74,11 +76,11 @@
public void stop()
{
- for (HornetQResourceRecovery hornetQResourceRecovery : configMap.values())
+ for (HornetQResourceRecovery hornetQResourceRecovery : resources)
{
registry.unRegister(hornetQResourceRecovery);
}
- configMap.clear();
+ resources.clear();
}
private void locateRecoveryRegistry()
@@ -105,9 +107,9 @@
{
registry = new RecoveryRegistry()
{
- public void register(HornetQResourceRecovery resourceRecovery)
+ public HornetQResourceRecovery register(HornetQResourceRecovery resourceRecovery)
{
- //no op
+ return null;
}
public void unRegister(HornetQResourceRecovery xaRecoveryConfig)
@@ -123,49 +125,4 @@
}
- public boolean isRegistered(HornetQConnectionFactory factory)
- {
- for (XARecoveryConfig xaRecoveryConfig : configMap.keySet())
- {
- TransportConfiguration[] transportConfigurations = factory.getServerLocator().getStaticTransportConfigurations();
-
- if (transportConfigurations != null)
- {
- TransportConfiguration[] xaConfigurations = xaRecoveryConfig.getHornetQConnectionFactory().getServerLocator().getStaticTransportConfigurations();
- if(xaConfigurations == null)
- {
- break;
- }
- if(transportConfigurations.length != xaConfigurations.length)
- {
- break;
- }
- boolean theSame=true;
- for(int i = 0; i < transportConfigurations.length; i++)
- {
- TransportConfiguration tc = transportConfigurations[i];
- TransportConfiguration xaTc = xaConfigurations[i];
- if(!tc.equals(xaTc))
- {
- theSame = false;
- break;
- }
- }
- if(theSame)
- {
- return theSame;
- }
- }
- else
- {
- DiscoveryGroupConfiguration discoveryGroupConfiguration = xaRecoveryConfig.getHornetQConnectionFactory().getServerLocator().getDiscoveryGroupConfiguration();
- if(discoveryGroupConfiguration != null && discoveryGroupConfiguration.equals(factory.getDiscoveryGroupConfiguration()))
- {
- return true;
- }
- }
- }
- return false;
- }
-
}
12 years, 2 months
JBoss hornetq SVN: r12260 - in trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration: jms/cluster and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 09:02:01 -0500 (Wed, 07 Mar 2012)
New Revision: 12260
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackManualTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
Log:
Fix: retryInterval should always be positive
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -61,25 +61,25 @@
locator.setBlockOnDurableSend(true);
locator.setFailoverOnInitialConnection(true);
locator.setReconnectAttempts(-1);
- ((ServerLocatorInternal)locator).setIdentity("testAutoFailback");
-
+ locator.setIdentity("testAutoFailback");
+
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator, 2);
final CountDownLatch latch = new CountDownLatch(1);
ClientSession session = sendAndConsume(sf, true);
-
+
System.out.println(locator.getTopology().describe());
CountDownSessionFailureListener listener = new CountDownSessionFailureListener(latch);
session.addFailureListener(listener);
-
+
liveServer.crash();
-
+
assertTrue(latch.await(5, TimeUnit.SECONDS));
-
+
log.info("backup (nowLive) topology = " + backupServer.getServer().getClusterManager().getDefaultConnection().getTopology().describe());
-
+
log.info("Server Crash!!!");
ClientProducer producer = session.createProducer(FailoverTestBase.ADDRESS);
@@ -93,8 +93,8 @@
verifyMessageOnServer(1, 1);
System.out.println(locator.getTopology().describe());
-
+
session.removeFailureListener(listener);
final CountDownLatch latch2 = new CountDownLatch(1);
@@ -105,9 +105,9 @@
log.info("******* starting live server back");
liveServer.start();
-
+
Thread.sleep(1000);
-
+
System.out.println("After failback: " + locator.getTopology().describe());
assertTrue(latch2.await(5, TimeUnit.SECONDS));
@@ -159,7 +159,7 @@
locator.setFailoverOnInitialConnection(true);
locator.setReconnectAttempts(-1);
ClientSessionFactoryInternal sf = createSessionFactoryAndWaitForTopology(locator, 2);
-
+
ClientSession session = sendAndConsume(sf, true);
CountDownSessionFailureListener listener = new CountDownSessionFailureListener();
@@ -184,7 +184,7 @@
log.info("restarting live node now");
liveServer.start();
-
+
assertTrue(listener.getLatch().await(5, TimeUnit.SECONDS));
message = session.createMessage(true);
@@ -235,7 +235,9 @@
backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
ArrayList<String> staticConnectors = new ArrayList<String>();
staticConnectors.add(liveConnector.getName());
- ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), -1, false, false, 1, 1,
+ ClusterConnectionConfiguration cccLive =
+ new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), 10, false, false, 1,
+ 1,
staticConnectors, false);
backupConfig.getClusterConfigurations().add(cccLive);
backupServer = createTestableServer(backupConfig);
@@ -249,7 +251,8 @@
liveConfig.setClustered(true);
List<String> pairs = new ArrayList<String>();
pairs.add(backupConnector.getName());
- ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), -1, false, false, 1, 1,
+ ClusterConnectionConfiguration ccc0 =
+ new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), 10, false, false, 1, 1,
pairs, false);
liveConfig.getClusterConfigurations().add(ccc0);
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
@@ -311,7 +314,7 @@
}
ClientMessage message3 = consumer.receiveImmediate();
-
+
consumer.close();
Assert.assertNull(message3);
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackManualTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackManualTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackManualTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -125,7 +125,9 @@
backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
ArrayList<String> staticConnectors = new ArrayList<String>();
staticConnectors.add(liveConnector.getName());
- ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), -1, false, false, 1, 1,
+ ClusterConnectionConfiguration cccLive =
+ new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), 10, false, false, 1,
+ 1,
staticConnectors, false);
backupConfig.getClusterConfigurations().add(cccLive);
backupConfig.setAllowAutoFailBack(false);
@@ -139,7 +141,8 @@
liveConfig.setClustered(true);
List<String> pairs = new ArrayList<String>();
pairs.add(backupConnector.getName());
- ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), -1, false, false, 1, 1,
+ ClusterConnectionConfiguration ccc0 =
+ new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), 10, false, false, 1, 1,
pairs, false);
liveConfig.getClusterConfigurations().add(ccc0);
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -191,7 +191,7 @@
ClusterConnectionConfiguration ccc1 = new ClusterConnectionConfiguration("cluster1",
"jms",
backupConnector.getName(),
- -1,
+ 10,
false,
false,
1,
@@ -234,7 +234,7 @@
ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
"jms",
liveConnector.getName(),
- -1,
+ 10,
false,
false,
1,
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -124,10 +124,8 @@
backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
ArrayList<String> staticConnectors = new ArrayList<String>();
staticConnectors.add(liveConnector.getName());
- ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1",
- "jms",
- backupConnector.getName(),
- -1,
+ ClusterConnectionConfiguration cccLive =
+ new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), 10,
false,
false,
1,
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SingleLiveMultipleBackupsFailoverTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -144,7 +144,8 @@
TransportConfiguration backupConnector =
createTransportConfiguration(isNetty(), false, generateParams(nodeid, isNetty()));
ClusterConnectionConfiguration ccc1 =
- new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), -1, false, false, 1, 1,
+ new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), 10, false, false, 1,
+ 1,
staticConnectors, false);
config1.getClusterConfigurations().add(ccc1);
config1.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
@@ -169,7 +170,7 @@
config0.setSharedStore(true);
config0.setClustered(true);
ClusterConnectionConfiguration ccc0 =
- new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), -1, false, false, 1, 1,
+ new ClusterConnectionConfiguration("cluster1", "jms", liveConnector.getName(), 10, false, false, 1, 1,
null, false);
config0.getClusterConfigurations().add(ccc0);
config0.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2012-03-07 12:49:27 UTC (rev 12259)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/jms/cluster/JMSFailoverTest.java 2012-03-07 14:02:01 UTC (rev 12260)
@@ -363,7 +363,7 @@
ClusterConnectionConfiguration cccBackup = new ClusterConnectionConfiguration("cluster1",
"jms",
backuptc.getName(),
- -1,
+ 10,
false,
false,
1,
@@ -406,7 +406,7 @@
ClusterConnectionConfiguration ccc0 = new ClusterConnectionConfiguration("cluster1",
"jms",
livetc.getName(),
- -1,
+ 10,
false,
false,
1,
12 years, 2 months
JBoss hornetq SVN: r12259 - in trunk/hornetq-core/src/main/java/org/hornetq/core/server: cluster/impl and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:49:27 -0500 (Wed, 07 Mar 2012)
New Revision: 12259
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
HORNETQ-720 Announce replicating backup to cluster when up-to-date.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java 2012-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterManager.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -48,7 +48,7 @@
void flushExecutor();
- void announceBackup() throws Exception;
+ void announceBackup();
void deploy() throws Exception;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2012-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterManagerImpl.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -60,7 +60,7 @@
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author Clebert Suconic
- *
+ *
* Created 18 Nov 2008 09:23:49
*
*
@@ -80,7 +80,7 @@
private final PostOffice postOffice;
private final ScheduledExecutorService scheduledExecutor;
-
+
private ClusterConnection defaultClusterConnection;
private final ManagementService managementService;
@@ -155,7 +155,7 @@
return str.toString();
}
-
+
public ClusterConnection getDefaultConnection()
{
return defaultClusterConnection;
@@ -166,7 +166,7 @@
{
return "ClusterManagerImpl[server=" + server + "]@" + System.identityHashCode(this);
}
-
+
public String getNodeId()
{
return nodeUUID.toString();
@@ -202,7 +202,7 @@
group.start();
}
}
-
+
for (ClusterConnection conn : clusterConnections.values())
{
conn.start();
@@ -357,7 +357,8 @@
}
}
- public void announceBackup() throws Exception
+ @Override
+ public void announceBackup()
{
for (ClusterConnection conn : this.clusterConnections.values())
{
@@ -399,7 +400,7 @@
{
this.clusterLocators.remove(serverLocator);
}
-
+
public synchronized void deployBridge(final BridgeConfiguration config, final boolean start) throws Exception
{
if (config.getName() == null)
@@ -503,7 +504,7 @@
serverLocator.setProducerWindowSize(-1);
// This will be set to 30s unless it's changed from embedded / testing
- // there is no reason to exception the config for this timeout
+ // there is no reason to exception the config for this timeout
// since the Bridge is supposed to be non-blocking and fast
// We may expose this if we find a good use case
serverLocator.setCallTimeout(config.getCallTimeout());
@@ -537,7 +538,7 @@
bridges.put(config.getName(), bridge);
managementService.registerBridge(bridge, config);
-
+
if (start)
{
bridge.start();
@@ -594,14 +595,14 @@
}
// Private methods ----------------------------------------------------------------------------------------------------
-
-
+
+
private void clearClusterConnections()
{
clusterConnections.clear();
this.defaultClusterConnection = null;
}
-
+
private void deployClusterConnection(final ClusterConnectionConfiguration config) throws Exception
{
if (config.getName() == null)
@@ -729,7 +730,7 @@
{
defaultClusterConnection = clusterConnection;
}
-
+
managementService.registerCluster(clusterConnection, config);
clusterConnections.put(config.getName(), clusterConnection);
@@ -739,7 +740,7 @@
log.debug("ClusterConnection.start at " + clusterConnection, new Exception("trace"));
}
}
-
+
private Transformer instantiateTransformer(final String transformerClassName)
{
Transformer transformer = null;
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-03-07 12:49:11 UTC (rev 12258)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-03-07 12:49:27 UTC (rev 12259)
@@ -2385,6 +2385,7 @@
public void setRemoteBackupUpToDate(String nodeID)
{
nodeManager.setNodeID(nodeID);
+ clusterManager.announceBackup();
backupUpToDate = true;
}
12 years, 2 months
JBoss hornetq SVN: r12258 - trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:49:11 -0500 (Wed, 07 Mar 2012)
New Revision: 12258
Modified:
trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRASession.java
Log:
Fix type warnings
Modified: trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRASession.java
===================================================================
--- trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRASession.java 2012-03-07 12:48:58 UTC (rev 12257)
+++ trunk/hornetq-ra/hornetq-ra-jar/src/main/java/org/hornetq/ra/HornetQRASession.java 2012-03-07 12:49:11 UTC (rev 12258)
@@ -50,13 +50,14 @@
import javax.resource.ResourceException;
import javax.resource.spi.ConnectionEvent;
import javax.resource.spi.ManagedConnection;
+import javax.transaction.RollbackException;
import javax.transaction.xa.XAResource;
import org.hornetq.core.logging.Logger;
/**
* A joint interface for JMS sessions
- *
+ *
* @author <a href="mailto:adrian@jboss.com">Adrian Brock</a>
* @author <a href="mailto:jesper.pedersen@jboss.org">Jesper Pedersen</a>
* @version $Revision: $
@@ -79,10 +80,10 @@
private HornetQRASessionFactory sf;
/** The message consumers */
- private final Set consumers;
+ private final Set<MessageConsumer> consumers;
/** The message producers */
- private final Set producers;
+ private final Set<MessageProducer> producers;
/**
* Constructor
@@ -99,8 +100,8 @@
this.mc = mc;
this.cri = cri;
sf = null;
- consumers = new HashSet();
- producers = new HashSet();
+ consumers = new HashSet<MessageConsumer>();
+ producers = new HashSet<MessageProducer>();
}
/**
@@ -543,7 +544,7 @@
* Create a topic subscriber
* @param topic The topic
* @param messageSelector The message selector
- * @param noLocal If true inhibits the delivery of messages published by its own connection
+ * @param noLocal If true inhibits the delivery of messages published by its own connection
* @return The subscriber
* @exception JMSException Thrown if an error occurs
*/
@@ -630,7 +631,7 @@
* @param topic The topic
* @param name The name
* @param messageSelector The message selector
- * @param noLocal If true inhibits the delivery of messages published by its own connection
+ * @param noLocal If true inhibits the delivery of messages published by its own connection
* @return The subscriber
* @exception JMSException Thrown if an error occurs
*/
@@ -1100,7 +1101,7 @@
* Create a message consumer
* @param destination The destination
* @param messageSelector The message selector
- * @param noLocal If true inhibits the delivery of messages published by its own connection
+ * @param noLocal If true inhibits the delivery of messages published by its own connection
* @return The message consumer
* @exception JMSException Thrown if an error occurs
*/
@@ -1339,7 +1340,7 @@
{
return mc;
}
-
+
/**
* Destroy
*/
@@ -1425,7 +1426,7 @@
synchronized (consumers)
{
- for (Iterator i = consumers.iterator(); i.hasNext();)
+ for (Iterator<MessageConsumer> i = consumers.iterator(); i.hasNext();)
{
HornetQRAMessageConsumer consumer = (HornetQRAMessageConsumer)i.next();
try
@@ -1442,7 +1443,7 @@
synchronized (producers)
{
- for (Iterator i = producers.iterator(); i.hasNext();)
+ for (Iterator<MessageProducer> i = producers.iterator(); i.hasNext();)
{
HornetQRAMessageProducer producer = (HornetQRAMessageProducer)i.next();
try
@@ -1621,9 +1622,9 @@
}
/**
- * @throws SystemException
- * @throws RollbackException
- *
+ * @throws SystemException
+ * @throws RollbackException
+ *
*/
public void checkState() throws JMSException
{
12 years, 2 months
JBoss hornetq SVN: r12257 - trunk/etc.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:48:58 -0500 (Wed, 07 Mar 2012)
New Revision: 12257
Modified:
trunk/etc/findbugs-exclude.xml
Log:
findbugs: Ok to return mutable object in these cases
Modified: trunk/etc/findbugs-exclude.xml
===================================================================
--- trunk/etc/findbugs-exclude.xml 2012-03-07 12:48:48 UTC (rev 12256)
+++ trunk/etc/findbugs-exclude.xml 2012-03-07 12:48:58 UTC (rev 12257)
@@ -14,6 +14,27 @@
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
+ <!-- Ok to return mutable Object -->
+ <Match>
+ <Or>
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationStartSyncMessage" />
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationSyncFileMessage" />
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationLargeMessageWriteMessage" />
+ </Or>
+ <Bug pattern="EI_EXPOSE_REP"/>
+ </Match>
+ <!-- Ok to return mutable Object, here restricted to method getRecordData -->
+ <Match>
+ <Or>
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationAddMessage" />
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationAddTXMessage" />
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationDeleteTXMessage" />
+ <Class name="org.hornetq.core.protocol.core.impl.wireformat.ReplicationPrepareMessage" />
+ </Or>
+ <Method name="getRecordData" />
+ <Bug pattern="EI_EXPOSE_REP"/>
+ </Match>
+
<!-- Comparison is correct within its context -->
<Match>
<Class name="org.hornetq.ra.Util"/>
12 years, 2 months
JBoss hornetq SVN: r12256 - in trunk: tests/integration-tests/src/test/java/org/hornetq/tests/util and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:48:48 -0500 (Wed, 07 Mar 2012)
New Revision: 12256
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java
Log:
HORNETQ-720 Set positive value for the cluster retry interval of replication tests
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java 2012-03-07 12:48:23 UTC (rev 12255)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java 2012-03-07 12:48:48 UTC (rev 12256)
@@ -122,6 +122,8 @@
this.connectorName = connectorName;
this.clientFailureCheckPeriod = clientFailureCheckPeriod;
this.connectionTTL = connectionTTL;
+ if (retryInterval <= 0)
+ throw new IllegalArgumentException("retry interval must be positive, was " + retryInterval);
this.retryInterval = retryInterval;
this.retryIntervalMultiplier = retryIntervalMultiplier;
this.maxRetryInterval = maxRetryInterval;
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java 2012-03-07 12:48:23 UTC (rev 12255)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/util/ReplicatedBackupUtils.java 2012-03-07 12:48:48 UTC (rev 12256)
@@ -33,7 +33,7 @@
conn.add(iConn);
}
ClusterConnectionConfiguration clusterConfig =
- new ClusterConnectionConfiguration("cluster1", "jms", name, -1, false, false, 1, 1, conn, false);
+ new ClusterConnectionConfiguration("cluster1", "jms", name, 250, false, false, 1, 1, conn, false);
configuration.getClusterConfigurations().add(clusterConfig);
}
12 years, 2 months
JBoss hornetq SVN: r12255 - in trunk/hornetq-core/src/main/java/org/hornetq/core: server/cluster and 1 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:48:23 -0500 (Wed, 07 Mar 2012)
New Revision: 12255
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterConnection.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Fix javadoc warnings
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-07 12:47:50 UTC (rev 12254)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-07 12:48:23 UTC (rev 12255)
@@ -148,7 +148,7 @@
}
/**
- * @param uniqueEventID an unique identifier for when the change was made We will use current
+ * @param uniqueEventID an unique identifier for when the change was made. We will use current
* time millis for starts, and a ++ of that number for shutdown.
* @param nodeId
* @param memberInput
@@ -372,7 +372,6 @@
/**
* it will send the member to its listeners
* @param nodeID
- * @param member
*/
public void sendMember(final String nodeID)
{
@@ -523,9 +522,6 @@
return null;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString()
{
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterConnection.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterConnection.java 2012-03-07 12:47:50 UTC (rev 12254)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/ClusterConnection.java 2012-03-07 12:48:23 UTC (rev 12255)
@@ -27,7 +27,7 @@
* A ClusterConnection
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
- *
+ *
* Created 23 Jan 2009 14:51:55
*
*
@@ -37,33 +37,33 @@
SimpleString getName();
String getNodeID();
-
+
HornetQServer getServer();
-
+
void nodeAnnounced(long eventUID, String nodeID, Pair<TransportConfiguration, TransportConfiguration> connectorPair, boolean backup);
void addClusterTopologyListener(ClusterTopologyListener listener);
-
+
void removeClusterTopologyListener(ClusterTopologyListener listener);
-
+
/**
* @return a Map of node ID and addresses
*/
Map<String, String> getNodes();
void activate() throws Exception;
-
+
TransportConfiguration getConnector();
-
+
Topology getTopology();
-
+
void flushExecutor();
// for debug
String describe();
void informTopology();
-
+
void announceBackup();
boolean isNodeActive(String id);
@@ -72,8 +72,8 @@
* Verifies whether user and password match the ones configured for this ClusterConnection.
* @param clusterUser
* @param clusterPassword
- * @return
+ * @return {@code true} if username and password match, {@code false} otherwise.
*/
boolean verify(String clusterUser, String clusterPassword);
-
+
}
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-03-07 12:47:50 UTC (rev 12254)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2012-03-07 12:48:23 UTC (rev 12255)
@@ -2374,7 +2374,8 @@
* not take over the live's functions.
* <p>
* A local backup server or a live server should always return {@code true}
- * @return
+ * @return whether the backup is up-to-date, if the server is not a backup it always returns
+ * {@code true}.
*/
public boolean isRemoteBackupUpToDate()
{
12 years, 2 months
JBoss hornetq SVN: r12254 - in trunk/hornetq-core/src/main/java/org/hornetq: core/client/impl and 2 other directories.
by do-not-reply@jboss.org
Author: borges
Date: 2012-03-07 07:47:50 -0500 (Wed, 07 Mar 2012)
New Revision: 12254
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java
trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
Log:
Make some classes final
Modified: trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java 2012-03-06 22:56:22 UTC (rev 12253)
+++ trunk/hornetq-core/src/main/java/org/hornetq/api/core/client/HornetQClient.java 2012-03-07 12:47:50 UTC (rev 12254)
@@ -26,7 +26,7 @@
*
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
*/
-public class HornetQClient
+public final class HornetQClient
{
public static final String DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME = RoundRobinConnectionLoadBalancingPolicy.class.getCanonicalName();
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-06 22:56:22 UTC (rev 12253)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/Topology.java 2012-03-07 12:47:50 UTC (rev 12254)
@@ -32,7 +32,7 @@
* @author Clebert Suconic
* Created Aug 16, 2010
*/
-public class Topology implements Serializable
+public final class Topology implements Serializable
{
private static final long serialVersionUID = -9037171688692471371L;
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java 2012-03-06 22:56:22 UTC (rev 12253)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/config/ClusterConnectionConfiguration.java 2012-03-07 12:47:50 UTC (rev 12254)
@@ -24,28 +24,28 @@
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*/
-public class ClusterConnectionConfiguration implements Serializable
+public final class ClusterConnectionConfiguration implements Serializable
{
private static final long serialVersionUID = 8948303813427795935L;
private final String name;
private final String address;
-
+
private final String connectorName;
private final long clientFailureCheckPeriod;
-
+
private final long connectionTTL;
-
+
private final long retryInterval;
-
+
private final double retryIntervalMultiplier;
-
+
private final long maxRetryInterval;
-
+
private final int reconnectAttempts;
-
+
private final long callTimeout;
private final long callFailoverTimeout;
@@ -63,9 +63,9 @@
private final int confirmationWindowSize;
private final boolean allowDirectConnectionsOnly;
-
+
private final int minLargeMessageSize;
-
+
public ClusterConnectionConfiguration(final String name,
final String address,
final String connectorName,
@@ -138,7 +138,7 @@
this.minLargeMessageSize = minLargeMessageSize;
}
-
+
public ClusterConnectionConfiguration(final String name,
final String address,
final String connectorName,
@@ -217,7 +217,7 @@
{
return address;
}
-
+
/**
* @return the clientFailureCheckPeriod
*/
@@ -257,7 +257,7 @@
{
return reconnectAttempts;
}
-
+
public long getCallTimeout()
{
return callTimeout;
@@ -321,6 +321,6 @@
{
return minLargeMessageSize;
}
-
-
+
+
}
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2012-03-06 22:56:22 UTC (rev 12253)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/cluster/impl/ClusterConnectionImpl.java 2012-03-07 12:47:50 UTC (rev 12254)
@@ -66,17 +66,17 @@
import org.hornetq.utils.UUID;
/**
- *
+ *
* A ClusterConnectionImpl
*
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author Clebert Suconic
- *
+ *
* Created 21 Jan 2009 14:43:05
*
*
*/
-public class ClusterConnectionImpl implements ClusterConnection, AfterConnectInternalListener
+public final class ClusterConnectionImpl implements ClusterConnection, AfterConnectInternalListener
{
private static final Logger log = Logger.getLogger(ClusterConnectionImpl.class);
@@ -145,7 +145,7 @@
private final Set<TransportConfiguration> allowableConnections = new HashSet<TransportConfiguration>();
private final ClusterManagerInternal manager;
-
+
private final int minLargeMessageSize;
@@ -247,7 +247,7 @@
this.callTimeout = callTimeout;
this.callFailoverTimeout = callFailoverTimeout;
-
+
this.minLargeMessageSize = minLargeMessageSize;
clusterConnector = new StaticClusterConnector(tcConfigs);
@@ -324,7 +324,7 @@
this.retryIntervalMultiplier = retryIntervalMultiplier;
this.maxRetryInterval = maxRetryInterval;
-
+
this.minLargeMessageSize = minLargeMessageSize;
this.reconnectAttempts = reconnectAttempts;
@@ -512,7 +512,7 @@
{
announceBackup();
}
-
+
}, retryInterval, TimeUnit.MILLISECONDS);
}
}
@@ -699,7 +699,7 @@
serverLocator.setBlockOnDurableSend(!useDuplicateDetection);
serverLocator.setBlockOnNonDurableSend(!useDuplicateDetection);
serverLocator.setCallTimeout(callTimeout);
-
+
// No producer flow control on the bridges, as we don't want to lock the queues
serverLocator.setProducerWindowSize(-1);
12 years, 2 months