JBoss hornetq SVN: r11713 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-18 12:43:25 -0500 (Fri, 18 Nov 2011)
New Revision: 11713
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java
Log:
https://issues.jboss.org/browse/JBPAPP-7521 - NPE on filter==null passed on destroy queue
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java 2011-11-18 17:32:29 UTC (rev 11712)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java 2011-11-18 17:43:25 UTC (rev 11713)
@@ -115,7 +115,7 @@
while (iter.hasNext())
{
MessageReference ref = iter.next();
- if (filter.match(ref.getMessage()))
+ if (filter == null || filter.match(ref.getMessage()))
{
iter.remove();
refs.add(ref);
13 years, 1 month
JBoss hornetq SVN: r11712 - branches/Branch_2_2_AS7.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-11-18 12:32:29 -0500 (Fri, 18 Nov 2011)
New Revision: 11712
Modified:
branches/Branch_2_2_AS7/.classpath
Log:
fixing classpath on eclipse
Modified: branches/Branch_2_2_AS7/.classpath
===================================================================
--- branches/Branch_2_2_AS7/.classpath 2011-11-18 11:18:54 UTC (rev 11711)
+++ branches/Branch_2_2_AS7/.classpath 2011-11-18 17:32:29 UTC (rev 11712)
@@ -119,6 +119,7 @@
<classpathentry kind="lib" path="thirdparty/org/jboss/lib/jboss-mdr.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/lib/jboss-reflect.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/lib/jbossxb.jar"/>
+ <classpathentry kind="lib" path="thirdparty/org/jboss/logging/lib/jboss-logging.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/logging/lib/jboss-logging-spi.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/microcontainer/lib/jboss-dependency.jar"/>
<classpathentry kind="lib" path="thirdparty/org/jboss/microcontainer/lib/jboss-kernel.jar"/>
@@ -133,5 +134,6 @@
<classpathentry kind="lib" path="thirdparty/org/springframework/lib/spring-expression.jar"/>
<classpathentry kind="lib" path="thirdparty/org/springframework/lib/spring-jms.jar"/>
<classpathentry kind="lib" path="thirdparty/org/springframework/lib/spring-tx.jar"/>
+ <classpathentry kind="lib" path="thirdparty/org/jboss/msc/lib/jboss-msc.jar"/>
<classpathentry kind="output" path="eclipse-output"/>
</classpath>
13 years, 1 month
JBoss hornetq SVN: r11711 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 06:18:54 -0500 (Fri, 18 Nov 2011)
New Revision: 11711
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
Log:
Improve tearDown: make sure everything gets closed.
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-11-18 10:47:20 UTC (rev 11710)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java 2011-11-18 11:18:54 UTC (rev 11711)
@@ -311,10 +311,13 @@
{
TestInterceptor.value.set(false);
if (!session.isClosed())
- session.commit();
+ session.close();
if (!session2.isClosed())
- session2.commit();
+ session2.close();
+ if (sf != null)
+ sf.close();
}
+
}
public void testExceptionSettingActionBefore() throws Exception
@@ -552,23 +555,21 @@
@Override
protected void tearDown() throws Exception
{
-
stopComponent(manager);
manager = null;
+ stopComponent(backupServer);
+ backupServer = null;
stopComponent(liveServer);
liveServer = null;
- stopComponent(backupServer);
- backupServer = null;
+ closeServerLocator(locator);
- executor.shutdown();
+ executor.shutdownNow();
+ scheduledExecutor.shutdownNow();
- scheduledExecutor.shutdown();
-
tFactory = null;
scheduledExecutor = null;
super.tearDown();
-
}
protected
13 years, 1 month
JBoss hornetq SVN: r11710 - trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:47:20 -0500 (Fri, 18 Nov 2011)
New Revision: 11710
Modified:
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
Log:
Silence unittest
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2011-11-18 10:47:05 UTC (rev 11709)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2011-11-18 10:47:20 UTC (rev 11710)
@@ -67,6 +67,7 @@
// Public --------------------------------------------------------
+ @Override
protected void setUp() throws Exception
{
super.setUp();
@@ -77,6 +78,7 @@
tmp.mkdirs();
}
+ @Override
protected void tearDown() throws Exception
{
super.tearDown();
@@ -423,7 +425,7 @@
dataRead = input.read(line);
if (dataRead > 0)
{
- System.out.println("Read one line with " + dataRead + " bytes");
+ // System.out.println("Read one line with " + dataRead + " bytes");
totalBytes.addAndGet(dataRead);
if (count.incrementAndGet() == 3)
{
@@ -576,9 +578,9 @@
for (int i = 100; i < byteArray.length; i += 10)
{
byte readBytes[] = new byte[10];
-
+
int size = is.read(readBytes);
-
+
for (int j = 0; j < size; j++)
{
assertEquals(getSamplebyte(i + j), readBytes[j]);
13 years, 1 month
JBoss hornetq SVN: r11709 - trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:47:05 -0500 (Fri, 18 Nov 2011)
New Revision: 11709
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java
Log:
Avoid hiding owner class' field.
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 2011-11-18 10:46:53 UTC (rev 11708)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/HornetQServerImpl.java 2011-11-18 10:47:05 UTC (rev 11709)
@@ -2022,7 +2022,7 @@
private final class SharedNothingBackupActivation implements Activation
{
- private ServerLocatorInternal serverLocator;
+ private ServerLocatorInternal serverLocator0;
private volatile boolean failedConnection;
public void run()
@@ -2042,11 +2042,11 @@
clusterManager.start();
final TransportConfiguration config = configuration.getConnectorConfigurations().get(liveConnectorName);
- serverLocator = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(config);
- final QuorumManager quorumManager = new QuorumManager(serverLocator);
+ serverLocator0 = (ServerLocatorInternal)HornetQClient.createServerLocatorWithHA(config);
+ final QuorumManager quorumManager = new QuorumManager(serverLocator0);
replicationEndpoint.setQuorumManager(quorumManager);
- serverLocator.setReconnectAttempts(-1);
+ serverLocator0.setReconnectAttempts(-1);
threadPool.execute(new Runnable()
{
@@ -2055,7 +2055,7 @@
{
try
{
- final ClientSessionFactory liveServerSessionFactory = serverLocator.connect();
+ final ClientSessionFactory liveServerSessionFactory = serverLocator0.connect();
if (liveServerSessionFactory == null)
{
// XXX HORNETQ-768
@@ -2111,7 +2111,7 @@
}
}
- serverLocator.close();
+ serverLocator0.close();
replicationEndpoint.stop();
if (failedConnection)
@@ -2148,10 +2148,10 @@
public void close(final boolean permanently) throws Exception
{
- if (serverLocator != null)
+ if (serverLocator0 != null)
{
- serverLocator.close();
- serverLocator = null;
+ serverLocator0.close();
+ serverLocator0 = null;
}
if (configuration.isBackup())
13 years, 1 month
JBoss hornetq SVN: r11708 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:46:53 -0500 (Fri, 18 Nov 2011)
New Revision: 11708
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
Log:
Fix type warnings
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-11-18 10:46:38 UTC (rev 11707)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-11-18 10:46:53 UTC (rev 11708)
@@ -1243,7 +1243,7 @@
Assert.assertTrue(counts.contains(messageCount));
}
- LinkedList[] lists = new LinkedList[consumerIDs.length];
+ List<LinkedList<Integer>> lists = new ArrayList<LinkedList<Integer>>(consumerIDs.length);
for (int i = 0; i < messageCounts.length; i++)
{
@@ -1253,7 +1253,7 @@
if (elem == messageCounts[i])
{
- lists[i] = list;
+ lists.set(i, list);
break;
}
@@ -1263,17 +1263,17 @@
for (int messageCount : messageCounts)
{
- LinkedList list = lists[index];
+ LinkedList<Integer> list = lists.get(index);
Assert.assertNotNull(list);
- int elem = (Integer)list.poll();
+ int elem = list.poll();
Assert.assertEquals(messageCount, elem);
index++;
- if (index == lists.length)
+ if (index == consumerIDs.length)
{
index = 0;
}
13 years, 1 month
JBoss hornetq SVN: r11707 - 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: 2011-11-18 05:46:38 -0500 (Fri, 18 Nov 2011)
New Revision: 11707
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java
Log:
Improve tearDown()
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-11-18 10:46:23 UTC (rev 11706)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/distribution/ClusterTestBase.java 2011-11-18 10:46:38 UTC (rev 11707)
@@ -243,6 +243,12 @@
}
}
}
+
+ @Override
+ public String toString()
+ {
+ return "id=" + id + ", consumer=" + consumer + ", session=" + session;
+ }
}
protected ClientConsumer getConsumer(final int node)
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-11-18 10:46:23 UTC (rev 11706)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2011-11-18 10:46:38 UTC (rev 11707)
@@ -56,9 +56,6 @@
protected void setUp() throws Exception
{
super.setUp();
-
- //FailoverManagerImpl.enableDebug();
-
setupServers();
}
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 2011-11-18 10:46:23 UTC (rev 11706)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/MultipleLivesMultipleBackupsFailoverTest.java 2011-11-18 10:46:38 UTC (rev 11707)
@@ -35,6 +35,8 @@
public class MultipleLivesMultipleBackupsFailoverTest extends MultipleBackupsFailoverTestBase
{
protected Map<Integer, TestableServer> servers = new HashMap<Integer, TestableServer>();
+ private ServerLocator locator2;
+ private ServerLocator locator;
@Override
protected void tearDown() throws Exception
@@ -53,6 +55,8 @@
}
}
}
+ closeServerLocator(locator);
+ closeServerLocator(locator2);
super.tearDown();
}
@@ -72,20 +76,20 @@
servers.get(3).start();
waitForServer(servers.get(3).getServer());
-
+
servers.get(1).start();
waitForServer(servers.get(1).getServer());
servers.get(2).start();
-
+
servers.get(4).start();
waitForServer(servers.get(4).getServer());
-
+
servers.get(5).start();
waitForServer(servers.get(4).getServer());
- ServerLocator locator = getServerLocator(0);
+ locator = getServerLocator(0);
locator.setBlockOnNonDurableSend(true);
locator.setBlockOnDurableSend(true);
@@ -100,7 +104,7 @@
int liveAfter0 = waitForNewLive(10000, true, servers, 1, 2);
- ServerLocator locator2 = getServerLocator(3);
+ locator2 = getServerLocator(3);
locator2.setBlockOnNonDurableSend(true);
locator2.setBlockOnDurableSend(true);
locator2.setBlockOnAcknowledge(true);
@@ -249,6 +253,7 @@
new SameProcessHornetQServer(createInVMFailoverServer(true, config0, nodeManager, liveNode)));
}
+ @Override
protected boolean isNetty()
{
return false;
13 years, 1 month
JBoss hornetq SVN: r11706 - trunk/etc.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:46:23 -0500 (Fri, 18 Nov 2011)
New Revision: 11706
Modified:
trunk/etc/org.eclipse.jdt.core.prefs
trunk/etc/org.eclipse.jdt.ui.prefs
Log:
Eclipse preferences update
Modified: trunk/etc/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/etc/org.eclipse.jdt.core.prefs 2011-11-18 10:46:13 UTC (rev 11705)
+++ trunk/etc/org.eclipse.jdt.core.prefs 2011-11-18 10:46:23 UTC (rev 11706)
@@ -1,4 +1,4 @@
-#Tue Jul 05 17:04:57 CEST 2011
+#Tue Nov 08 17:31:37 CET 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -34,16 +34,18 @@
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=18
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=82
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=82
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=32
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=18
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=82
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=82
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=82
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=82
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=82
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=18
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
@@ -175,12 +177,14 @@
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
@@ -204,6 +208,7 @@
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
@@ -259,6 +264,7 @@
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
@@ -268,6 +274,7 @@
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
@@ -294,4 +301,5 @@
org.eclipse.jdt.core.formatter.use_on_off_tags=true
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
Modified: trunk/etc/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/etc/org.eclipse.jdt.ui.prefs 2011-11-18 10:46:13 UTC (rev 11705)
+++ trunk/etc/org.eclipse.jdt.ui.prefs 2011-11-18 10:46:23 UTC (rev 11706)
@@ -1,4 +1,4 @@
-#Tue Jun 28 17:14:52 CEST 2011
+#Thu Nov 10 13:53:54 CET 2011
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
@@ -64,6 +64,7 @@
org.eclipse.jdt.ui.ondemandthreshold=9999
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=9999
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment!
_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" delete!
d\="false" description\="Comment for overriding methods" enabl!
ed\="tru
e" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bod!
ies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabl!
ed\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbo!
dy" name
\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
13 years, 1 month
JBoss hornetq SVN: r11705 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:46:13 -0500 (Fri, 18 Nov 2011)
New Revision: 11705
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/FailoverTestBase.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java
Log:
Use a single createServer(configuration) method
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 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackAutoTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -251,7 +251,7 @@
ClusterConnectionConfiguration cccLive = new ClusterConnectionConfiguration("cluster1", "jms", backupConnector.getName(), -1, false, false, 1, 1,
staticConnectors, false);
backupConfig.getClusterConfigurations().add(cccLive);
- backupServer = createBackupServer();
+ backupServer = createServer(backupConfig);
liveConfig = super.createDefaultConfig();
liveConfig.getAcceptorConfigurations().clear();
@@ -267,7 +267,7 @@
liveConfig.getClusterConfigurations().add(ccc0);
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
liveConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
- liveServer = createLiveServer();
+ liveServer = createServer(liveConfig);
}
@Override
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 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailBackManualTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -162,7 +162,7 @@
staticConnectors, false);
backupConfig.getClusterConfigurations().add(cccLive);
backupConfig.setAllowAutoFailBack(false);
- backupServer = createBackupServer();
+ backupServer = createServer(backupConfig);
liveConfig = super.createDefaultConfig();
liveConfig.getAcceptorConfigurations().clear();
@@ -178,7 +178,7 @@
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
liveConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
liveConfig.setAllowAutoFailBack(false);
- liveServer = createLiveServer();
+ liveServer = createServer(liveConfig);
}
@Override
@@ -246,6 +246,7 @@
* @param message
* @throws Exception
*/
+ @Override
protected void setBody(final int i, final ClientMessage message) throws Exception
{
message.getBodyBuffer().writeString("message" + i);
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/FailoverTestBase.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -128,16 +128,12 @@
}
}
- protected TestableServer createLiveServer()
+ protected TestableServer createServer(Configuration config)
{
- return new SameProcessHornetQServer(createInVMFailoverServer(true, liveConfig, nodeManager, 1));
+ return new SameProcessHornetQServer(
+ createInVMFailoverServer(true, config, nodeManager, config.isBackup() ? 2 : 1));
}
- protected TestableServer createBackupServer()
- {
- return new SameProcessHornetQServer(createInVMFailoverServer(true, backupConfig, nodeManager, 2));
- }
-
/**
* Large message version of {@link #setBody(int, ClientMessage)}.
* @param i
@@ -189,7 +185,7 @@
backupConfig.getConnectorConfigurations().put(backupConnector.getName(), backupConnector);
ReplicatedBackupUtils.createClusterConnectionConf(backupConfig, backupConnector.getName(),
liveConnector.getName());
- backupServer = createBackupServer();
+ backupServer = createServer(backupConfig);
liveConfig = super.createDefaultConfig();
liveConfig.getAcceptorConfigurations().clear();
@@ -199,11 +195,13 @@
liveConfig.setClustered(true);
ReplicatedBackupUtils.createClusterConnectionConf(liveConfig, liveConnector.getName());
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
- liveServer = createLiveServer();
+ liveServer = createServer(liveConfig);
}
- protected void createReplicatedConfigs() throws Exception
+ protected void createReplicatedConfigs()
{
+ nodeManager = new InVMNodeManager();
+
final TransportConfiguration liveConnector = getConnectorTransportConfiguration(true);
final TransportConfiguration backupConnector = getConnectorTransportConfiguration(false);
final TransportConfiguration backupAcceptor = getAcceptorTransportConfiguration(false);
@@ -215,18 +213,18 @@
ReplicatedBackupUtils.configureReplicationPair(backupConfig, backupConnector, backupAcceptor, liveConfig,
liveConnector);
- backupConfig.setBindingsDirectory(backupConfig.getBindingsDirectory() + "_backup");
- backupConfig.setJournalDirectory(backupConfig.getJournalDirectory() + "_backup");
- backupConfig.setPagingDirectory(backupConfig.getPagingDirectory() + "_backup");
- backupConfig.setLargeMessagesDirectory(backupConfig.getLargeMessagesDirectory() + "_backup");
+ final String sufix = "_backup";
+ backupConfig.setBindingsDirectory(backupConfig.getBindingsDirectory() + sufix);
+ backupConfig.setJournalDirectory(backupConfig.getJournalDirectory() + sufix);
+ backupConfig.setPagingDirectory(backupConfig.getPagingDirectory() + sufix);
+ backupConfig.setLargeMessagesDirectory(backupConfig.getLargeMessagesDirectory() + sufix);
backupConfig.setSecurityEnabled(false);
- backupServer = createBackupServer();
+ backupServer = createServer(backupConfig);
liveConfig.getAcceptorConfigurations().clear();
liveConfig.getAcceptorConfigurations().add(getAcceptorTransportConfiguration(true));
-
- liveServer = createLiveServer();
+ liveServer = createServer(liveConfig);
}
@Override
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/NettyReplicatedFailoverTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -13,6 +13,7 @@
package org.hornetq.tests.integration.cluster.failover;
+import org.hornetq.core.config.Configuration;
import org.hornetq.tests.integration.cluster.util.SameProcessHornetQServer;
import org.hornetq.tests.integration.cluster.util.TestableServer;
@@ -24,40 +25,15 @@
public class NettyReplicatedFailoverTest extends NettyFailoverTest
{
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
@Override
- protected TestableServer createLiveServer()
+ protected TestableServer createServer(Configuration config)
{
- return new SameProcessHornetQServer(createServer(true, liveConfig));
+ return new SameProcessHornetQServer(createServer(true, config));
}
@Override
- protected TestableServer createBackupServer()
- {
- return new SameProcessHornetQServer(createServer(true, backupConfig));
- }
-
- @Override
protected void createConfigs() throws Exception
{
createReplicatedConfigs();
}
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
}
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -220,17 +220,11 @@
}
@Override
- protected TestableServer createBackupServer()
+ protected TestableServer createServer(Configuration config)
{
- return new SameProcessHornetQServer(createServer(true, backupConfig));
+ return new SameProcessHornetQServer(createServer(true, config));
}
- @Override
- protected TestableServer createLiveServer()
- {
- return new SameProcessHornetQServer(createServer(true, liveConfig));
- }
-
// Private -------------------------------------------------------
// Inner classes -------------------------------------------------
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/RemoteFailoverTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -82,23 +82,22 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ e.printStackTrace();
}
}
}
@Override
- protected TestableServer createLiveServer()
+ protected TestableServer createServer(Configuration config)
{
+ if (config.isBackup())
+ {
+ return new SameProcessHornetQServer(HornetQServers.newHornetQServer(config));
+ }
return new RemoteProcessHornetQServer(SharedLiveServerConfiguration.class.getName());
}
-
+
@Override
- protected TestableServer createBackupServer()
- {
- return new SameProcessHornetQServer(HornetQServers.newHornetQServer(backupConfig));
- }
-
protected TransportConfiguration getConnectorTransportConfiguration(final boolean live) {
Map<String, Object> params = null;
if (live)
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ReplicatedAsynchronousFailoverTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -13,8 +13,6 @@
package org.hornetq.tests.integration.cluster.failover;
-import org.hornetq.tests.integration.cluster.util.SameProcessHornetQServer;
-import org.hornetq.tests.integration.cluster.util.TestableServer;
/**
* A ReplicatedAsynchronousFailoverTest
@@ -23,20 +21,7 @@
*/
public class ReplicatedAsynchronousFailoverTest extends AsynchronousFailoverTest
{
-
@Override
- protected TestableServer createLiveServer()
- {
- return new SameProcessHornetQServer(createInVMFailoverServer(true, liveConfig, nodeManager, 1));
- }
-
- @Override
- protected TestableServer createBackupServer()
- {
- return new SameProcessHornetQServer(createInVMFailoverServer(true, backupConfig, nodeManager, 2));
- }
-
- @Override
protected void createConfigs() throws Exception
{
createReplicatedConfigs();
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 2011-11-18 10:45:54 UTC (rev 11704)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/SecurityFailoverTest.java 2011-11-18 10:46:13 UTC (rev 11705)
@@ -22,7 +22,6 @@
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.core.config.ClusterConnectionConfiguration;
-import org.hornetq.core.config.Configuration;
import org.hornetq.core.security.Role;
import org.hornetq.core.server.impl.InVMNodeManager;
import org.hornetq.spi.core.security.HornetQSecurityManager;
@@ -67,6 +66,7 @@
ackBatchSize);
}
+ @Override
protected ClientSession createSession(ClientSessionFactory sf,
boolean autoCommitSends,
boolean autoCommitAcks,
@@ -76,16 +76,19 @@
.isPreAcknowledge(), ackBatchSize);
}
+ @Override
protected ClientSession createSession(ClientSessionFactory sf, boolean autoCommitSends, boolean autoCommitAcks) throws Exception
{
return createSession(sf, autoCommitSends, autoCommitAcks, sf.getServerLocator().getAckBatchSize());
}
+ @Override
protected ClientSession createSession(ClientSessionFactory sf) throws Exception
{
return createSession(sf, true, true, sf.getServerLocator().getAckBatchSize());
}
+ @Override
protected ClientSession createSession(ClientSessionFactory sf,
boolean xa,
boolean autoCommitSends,
@@ -97,6 +100,7 @@
/**
* @throws Exception
*/
+ @Override
protected void createConfigs() throws Exception
{
nodeManager = new InVMNodeManager();
@@ -125,7 +129,7 @@
staticConnectors,
false);
backupConfig.getClusterConfigurations().add(cccLive);
- backupServer = createBackupServer();
+ backupServer = createServer(backupConfig);
HornetQSecurityManager securityManager = installSecurity(backupServer);
@@ -150,11 +154,12 @@
false);
liveConfig.getClusterConfigurations().add(ccc0);
liveConfig.getConnectorConfigurations().put(liveConnector.getName(), liveConnector);
- liveServer = createLiveServer();
+ liveServer = createServer(liveConfig);
installSecurity(liveServer);
}
+ @Override
protected void beforeRestart(TestableServer server)
{
installSecurity(server);
13 years, 1 month
JBoss hornetq SVN: r11704 - trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal.
by do-not-reply@jboss.org
Author: borges
Date: 2011-11-18 05:45:54 -0500 (Fri, 18 Nov 2011)
New Revision: 11704
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
Log:
Add Javadoc documenting class' purpose
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-11-18 10:45:41 UTC (rev 11703)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2011-11-18 10:45:54 UTC (rev 11704)
@@ -108,13 +108,17 @@
import org.hornetq.utils.XidCodecSupport;
/**
- *
- * A JournalStorageManager
- *
+ * Controls access to the journals and other storage files such as the ones used to store pages and
+ * large messages. This class must control writing of any non-transient data, as it is the key point
+ * for synchronizing a replicating backup server.
+ * <p>
+ * Notice that, turning on and off replication (on the live server side) is _mostly_ a matter of
+ * using {@link ReplicatedJournal}s instead of regular {@link JournalImpl}, and sync the existing
+ * data.
+ * <p>
* @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="jmesnil(a)redhat.com">Jeff Mesnil</a>
- *
*/
public class JournalStorageManager implements StorageManager
{
13 years, 1 month