JBoss hornetq SVN: r11961 - in trunk: tests/unit-tests/src/test/java/org/hornetq/tests/unit/util and 1 other directory.
by do-not-reply@jboss.org
Author: borges
Date: 2012-01-04 09:11:58 -0500 (Wed, 04 Jan 2012)
New Revision: 11961
Modified:
trunk/hornetq-commons/src/main/java/org/hornetq/api/core/SimpleString.java
trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/SimpleStringTest.java
Log:
HORNETQ-822 Fix SimpleString.charAt(int) conversion error
Modified: trunk/hornetq-commons/src/main/java/org/hornetq/api/core/SimpleString.java
===================================================================
--- trunk/hornetq-commons/src/main/java/org/hornetq/api/core/SimpleString.java 2012-01-04 13:26:24 UTC (rev 11960)
+++ trunk/hornetq-commons/src/main/java/org/hornetq/api/core/SimpleString.java 2012-01-04 14:11:58 UTC (rev 11961)
@@ -25,7 +25,7 @@
* this minimises expensive copying between String objects.
*
* This object is used heavily throughout HornetQ for performance reasons.
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
@@ -116,7 +116,7 @@
}
pos <<= 1;
- return (char)(data[pos] | data[pos + 1] << 8);
+ return (char)((data[pos] & 0xFF) | (data[pos + 1] << 8) & 0xFF00);
}
public CharSequence subSequence(final int start, final int end)
@@ -215,7 +215,7 @@
{
return true;
}
-
+
if (other instanceof SimpleString)
{
SimpleString s = (SimpleString)other;
@@ -258,9 +258,8 @@
}
/**
- * splits this SimpleString into an array of SimpleString using the char param as the delimeter.
- *
- * i.e. "a.b" would return "a" and "b" if . was the delimeter
+ * Splits this SimpleString into an array of SimpleString using the char param as the delimiter.
+ * i.e. "a.b" would return "a" and "b" if . was the delimiter
* @param delim
*/
public SimpleString[] split(final char delim)
@@ -272,11 +271,13 @@
else
{
List<SimpleString> all = new ArrayList<SimpleString>();
+
+ byte low = (byte)(delim & 0xFF); // low byte
+ byte high = (byte)(delim >> 8 & 0xFF); // high byte
+
int lasPos = 0;
for (int i = 0; i < data.length; i += 2)
{
- byte low = (byte)(delim & 0xFF); // low byte
- byte high = (byte)(delim >> 8 & 0xFF); // high byte
if (data[i] == low && data[i + 1] == high)
{
byte[] bytes = new byte[i - lasPos];
@@ -301,10 +302,11 @@
*/
public boolean contains(final char c)
{
+ final byte low = (byte)(c & 0xFF); // low byte
+ final byte high = (byte)(c >> 8 & 0xFF); // high byte
+
for (int i = 0; i < data.length; i += 2)
{
- byte low = (byte)(c & 0xFF); // low byte
- byte high = (byte)(c >> 8 & 0xFF); // high byte
if (data[i] == low && data[i + 1] == high)
{
return true;
@@ -314,10 +316,9 @@
}
/**
- * concatanates a SimpleString and a String
- *
- * @param toAdd the String to concate with.
- * @return the concatanated SimpleString
+ * Concatenates a SimpleString and a String
+ * @param toAdd the String to concatenate with.
+ * @return the concatenated SimpleString
*/
public SimpleString concat(final String toAdd)
{
@@ -325,10 +326,9 @@
}
/**
- * concatanates 2 SimpleString's
- *
- * @param toAdd the SimpleString to concate with.
- * @return the concatanated SimpleString
+ * Concatenates 2 SimpleString's
+ * @param toAdd the SimpleString to concatenate with.
+ * @return the concatenated SimpleString
*/
public SimpleString concat(final SimpleString toAdd)
{
@@ -339,10 +339,9 @@
}
/**
- * concatanates a SimpleString and a char
- *
+ * Concatenates a SimpleString and a char
* @param c the char to concate with.
- * @return the concatanated SimpleString
+ * @return the concatenated SimpleString
*/
public SimpleString concat(final char c)
{
@@ -390,7 +389,7 @@
}
/**
- *
+ *
* @param srcBegin
* @param srcEnd
* @param dst
Modified: trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/SimpleStringTest.java
===================================================================
--- trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/SimpleStringTest.java 2012-01-04 13:26:24 UTC (rev 11960)
+++ trunk/tests/unit-tests/src/test/java/org/hornetq/tests/unit/util/SimpleStringTest.java 2012-01-04 14:11:58 UTC (rev 11961)
@@ -16,21 +16,63 @@
import java.util.concurrent.CountDownLatch;
import junit.framework.Assert;
+import junit.framework.TestCase;
import org.hornetq.api.core.SimpleString;
import org.hornetq.tests.util.RandomUtil;
-import org.hornetq.tests.util.UnitTestCase;
import org.hornetq.utils.DataConstants;
/**
- *
+ *
* A SimpleStringTest
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
*
*/
-public class SimpleStringTest extends UnitTestCase
+public class SimpleStringTest extends TestCase
{
+ /**
+ * Converting back and forth between char and byte requires care as char is unsigned.
+ * @see SimpleString#getChars(int, int, char[], int)
+ * @see SimpleString#charAt(int)
+ * @see SimpleString#split(char)
+ */
+ public void testGetChar()
+ {
+ SimpleString p1 = new SimpleString("foo");
+ SimpleString p2 = new SimpleString("bar");
+ for (int i = 0; i < 1 << 16; i++)
+ {
+ String msg = "expecting " + i;
+ char c = (char)i;
+ SimpleString s = new SimpleString(String.valueOf(c));
+
+ char[] c1 = new char[1];
+ s.getChars(0, 1, c1, 0);
+ assertEquals(msg, c, c1[0]);
+ assertEquals(msg, c, s.charAt(0));
+ SimpleString s2 = s.concat(c);
+ assertEquals(msg, c, s2.charAt(1));
+
+ // test splitting with chars
+ SimpleString sSplit = new SimpleString("foo" + String.valueOf(c) + "bar");
+ SimpleString[] chunks = sSplit.split(c);
+ SimpleString[] split1 = p1.split(c);
+ SimpleString[] split2 = p2.split(c);
+ assertEquals(split1.length + split2.length, chunks.length);
+ int j = 0;
+
+ for (SimpleString iS : split1)
+ {
+ assertEquals(iS.toString(), iS, chunks[j++]);
+ }
+ for (SimpleString iS : split2)
+ {
+ assertEquals(iS.toString(), iS, chunks[j++]);
+ }
+ }
+ }
+
public void testString() throws Exception
{
final String str = "hello123ABC__524`16254`6125!%^$!%$!%$!%$!%!$%!$$!\uA324";
12 years, 11 months
JBoss hornetq SVN: r11960 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-01-04 08:26:24 -0500 (Wed, 04 Jan 2012)
New Revision: 11960
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
JBPAPP-7844
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-01-04 12:38:50 UTC (rev 11959)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2012-01-04 13:26:24 UTC (rev 11960)
@@ -1146,8 +1146,15 @@
}
}
+ HashMap<String, String> metaDataToSend;
+
+ synchronized (metadata)
+ {
+ metaDataToSend = new HashMap<String, String>(metadata);
+ }
+
// Resetting the metadata after failover
- for (Map.Entry<String, String> entries : metadata.entrySet())
+ for (Map.Entry<String, String> entries : metaDataToSend.entrySet())
{
sendPacketWithoutLock(new SessionAddMetaDataMessageV2(entries.getKey(), entries.getValue(), false));
}
12 years, 11 months
JBoss hornetq SVN: r11959 - trunk.
by do-not-reply@jboss.org
Author: borges
Date: 2012-01-04 07:38:50 -0500 (Wed, 04 Jan 2012)
New Revision: 11959
Modified:
trunk/pom.xml
Log:
Add test timeouts due to hanging builds at QA's Jenkins. Surefire: fork=always, timeout=300s.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-04 12:38:45 UTC (rev 11958)
+++ trunk/pom.xml 2012-01-04 12:38:50 UTC (rev 11959)
@@ -472,6 +472,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.11</version>
<configuration>
+ <forkMode>always</forkMode>
+ <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
<testFailureIgnore>true</testFailureIgnore>
<runOrder>alphabetical</runOrder>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
12 years, 11 months
JBoss hornetq SVN: r11958 - trunk.
by do-not-reply@jboss.org
Author: borges
Date: 2012-01-04 07:38:45 -0500 (Wed, 04 Jan 2012)
New Revision: 11958
Modified:
trunk/pom.xml
Log:
Upgrade several Maven plugins.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2012-01-04 12:38:37 UTC (rev 11957)
+++ trunk/pom.xml 2012-01-04 12:38:45 UTC (rev 11958)
@@ -440,7 +440,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
- <version>1.4</version>
+ <version>1.5</version>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
@@ -470,7 +470,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.10</version>
+ <version>2.11</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<runOrder>alphabetical</runOrder>
@@ -481,7 +481,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.10</version>
+ <version>2.11</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -494,7 +494,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
- <version>2.5</version>
+ <version>2.6</version>
<configuration>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
@@ -558,7 +558,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.3.3</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<xmlOutput>true</xmlOutput>
@@ -609,7 +609,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.7</version>
+ <version>2.8</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
@@ -617,7 +617,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
- <version>2.3.2</version>
+ <version>2.3.3</version>
<configuration>
<xmlOutput>true</xmlOutput>
<effort>Max</effort>
12 years, 11 months
JBoss hornetq SVN: r11957 - 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-01-04 07:38:37 -0500 (Wed, 04 Jan 2012)
New Revision: 11957
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java
Log:
Remove unused field and variables.
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2012-01-03 17:49:08 UTC (rev 11956)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2012-01-04 12:38:37 UTC (rev 11957)
@@ -1507,7 +1507,6 @@
}
- private static int size = 0;
public class CloseRunnable implements Runnable
{
private final CoreRemotingConnection conn;
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 2012-01-03 17:49:08 UTC (rev 11956)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/cluster/failover/ClusterWithBackupFailoverTestBase.java 2012-01-04 12:38:37 UTC (rev 11957)
@@ -22,17 +22,14 @@
package org.hornetq.tests.integration.cluster.failover;
-import java.util.Map;
import java.util.Set;
-import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.core.logging.Logger;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.cluster.BroadcastGroup;
import org.hornetq.core.server.cluster.impl.ClusterManagerImpl;
import org.hornetq.spi.core.protocol.RemotingConnection;
import org.hornetq.tests.integration.cluster.distribution.ClusterTestBase;
-import org.hornetq.tests.util.UnitTestCase;
/**
*
@@ -260,19 +257,6 @@
{
ClusterWithBackupFailoverTestBase.log.info("*** failing node " + node);
- Map<String, Object> params = generateParams(node, isNetty());
-
- TransportConfiguration serverTC;
-
- if (isNetty())
- {
- serverTC = new TransportConfiguration(UnitTestCase.NETTY_CONNECTOR_FACTORY, params);
- }
- else
- {
- serverTC = new TransportConfiguration(UnitTestCase.INVM_CONNECTOR_FACTORY, params);
- }
-
HornetQServer server = getServer(node);
// Prevent remoting service taking any more connections
12 years, 11 months
JBoss hornetq SVN: r11956 - in branches/Branch_2_2_AS7/src/main/org/hornetq: ra/recovery and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-01-03 12:49:08 -0500 (Tue, 03 Jan 2012)
New Revision: 11956
Modified:
branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
branches/Branch_2_2_AS7/src/main/org/hornetq/ra/recovery/RecoveryManager.java
Log:
Merge changes from EAP
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2012-01-03 16:46:17 UTC (rev 11955)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2012-01-03 17:49:08 UTC (rev 11956)
@@ -17,7 +17,9 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Iterator;
+import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
@@ -47,7 +49,7 @@
{
// Constants
// ------------------------------------------------------------------------------------
-
+
private static final Logger log = Logger.getLogger(ClientConsumerImpl.class);
private static final boolean isTrace = log.isTraceEnabled();
@@ -568,7 +570,7 @@
// consumed in, which means that acking all up to won't work
ackIndividually = true;
}
-
+
// Add it to the buffer
buffer.addTail(messageToHandle, messageToHandle.getPriority());
@@ -823,6 +825,25 @@
if (clientWindowSize == 0)
{
sendCredits(0);
+
+ // If resetting a slow consumer, we need to wait the execution
+ final CountDownLatch latch = new CountDownLatch(1);
+ flowControlExecutor.execute(new Runnable()
+ {
+ public void run()
+ {
+ latch.countDown();
+ }
+ });
+
+ try
+ {
+ latch.await(10, TimeUnit.SECONDS);
+ }
+ catch (InterruptedException ignored)
+ {
+ // no big deal
+ }
}
}
Modified: branches/Branch_2_2_AS7/src/main/org/hornetq/ra/recovery/RecoveryManager.java
===================================================================
--- branches/Branch_2_2_AS7/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2012-01-03 16:46:17 UTC (rev 11955)
+++ branches/Branch_2_2_AS7/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2012-01-03 17:49:08 UTC (rev 11956)
@@ -90,7 +90,14 @@
for (int i = 0 ; i < locatorClasses.length; i++)
{
- registry = (RecoveryRegistry) safeInitNewInstance(locatorClasses[i]);
+ try
+ {
+ registry = (RecoveryRegistry) safeInitNewInstance(locatorClasses[i]);
+ }
+ catch (Throwable e)
+ {
+ log.debug("unable to load recovery registry " + locatorClasses[i], e);
+ }
if (registry != null)
{
break;
12 years, 11 months
JBoss hornetq SVN: r11955 - branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2012-01-03 11:46:17 -0500 (Tue, 03 Jan 2012)
New Revision: 11955
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
Log:
JBPAPP-7823 - fixing test
Modified: branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
--- branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2012-01-03 13:32:54 UTC (rev 11954)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/core/client/impl/ClientConsumerImpl.java 2012-01-03 16:46:17 UTC (rev 11955)
@@ -17,7 +17,9 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Iterator;
+import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
@@ -47,7 +49,7 @@
{
// Constants
// ------------------------------------------------------------------------------------
-
+
private static final Logger log = Logger.getLogger(ClientConsumerImpl.class);
private static final boolean isTrace = log.isTraceEnabled();
@@ -568,7 +570,7 @@
// consumed in, which means that acking all up to won't work
ackIndividually = true;
}
-
+
// Add it to the buffer
buffer.addTail(messageToHandle, messageToHandle.getPriority());
@@ -823,6 +825,25 @@
if (clientWindowSize == 0)
{
sendCredits(0);
+
+ // If resetting a slow consumer, we need to wait the execution
+ final CountDownLatch latch = new CountDownLatch(1);
+ flowControlExecutor.execute(new Runnable()
+ {
+ public void run()
+ {
+ latch.countDown();
+ }
+ });
+
+ try
+ {
+ latch.await(10, TimeUnit.SECONDS);
+ }
+ catch (InterruptedException ignored)
+ {
+ // no big deal
+ }
}
}
12 years, 11 months
JBoss hornetq SVN: r11954 - branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery.
by do-not-reply@jboss.org
Author: ataylor
Date: 2012-01-03 08:32:54 -0500 (Tue, 03 Jan 2012)
New Revision: 11954
Modified:
branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java
Log:
just log debug error if registry not available
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-01-03 11:55:15 UTC (rev 11953)
+++ branches/Branch_2_2_EAP/src/main/org/hornetq/ra/recovery/RecoveryManager.java 2012-01-03 13:32:54 UTC (rev 11954)
@@ -87,7 +87,14 @@
for (int i = 0 ; i < locatorClasses.length; i++)
{
- registry = Util.locateRecoveryRegistry(locatorClasses[i]);
+ try
+ {
+ registry = Util.locateRecoveryRegistry(locatorClasses[i]);
+ }
+ catch (Throwable e)
+ {
+ log.debug("unable to load recovery registry " + locatorClasses[i], e);
+ }
if (registry != null)
{
break;
12 years, 11 months
JBoss hornetq SVN: r11953 - trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl.
by do-not-reply@jboss.org
Author: borges
Date: 2012-01-03 06:55:15 -0500 (Tue, 03 Jan 2012)
New Revision: 11953
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java
Log:
At ServerSession.doClose(), don't re-start consumer during rollback (as the next thing to do will be to close it)
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-01-03 11:54:41 UTC (rev 11952)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSessionImpl.java 2012-01-03 11:55:15 UTC (rev 11953)
@@ -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>
*/
@@ -288,8 +288,7 @@
if (tx != null && tx.getXid() == null)
{
// We only rollback local txs on close, not XA tx branches
-
- rollback(failed);
+ rollback(failed, true);
}
Set<ServerConsumer> consumersClone = new HashSet<ServerConsumer>(consumers.values());
@@ -469,6 +468,7 @@
run();
}
+ @Override
public String toString()
{
return "Temporary Cleaner for queue " + bindingName;
@@ -619,6 +619,12 @@
public void rollback(final boolean considerLastMessageAsDelivered) throws Exception
{
+ rollback(considerLastMessageAsDelivered, false);
+ }
+
+ private void rollback(final boolean considerLastMessageAsDelivered, final boolean closing) throws Exception
+ {
+
if (tx == null)
{
// Might be null if XA
@@ -626,7 +632,7 @@
tx = new TransactionImpl(storageManager, timeoutSeconds);
}
- doRollback(considerLastMessageAsDelivered, tx);
+ doRollback(considerLastMessageAsDelivered, tx, closing);
if (xa)
{
@@ -855,7 +861,7 @@
}
else
{
- doRollback(false, theTx);
+ doRollback(false, theTx, false);
}
}
}
@@ -1062,7 +1068,7 @@
return;
}
-
+
consumer.receiveCredits(credits);
}
@@ -1077,7 +1083,7 @@
{
log.trace("sendLarge::" + largeMsg);
}
-
+
if (currentLargeMessage != null)
{
ServerSessionImpl.log.warn("Replacing incomplete LargeMessage with ID=" + currentLargeMessage.getMessageID());
@@ -1292,7 +1298,7 @@
// Public
// ----------------------------------------------------------------------------
-
+
public void clearLargeMessage()
{
currentLargeMessage = null;
@@ -1345,7 +1351,9 @@
}
}
- private void doRollback(final boolean lastMessageAsDelived, final Transaction theTx) throws Exception
+ private void
+ doRollback(final boolean lastMessageAsDelived, final Transaction theTx, final boolean closing)
+ throws Exception
{
boolean wasStarted = started;
@@ -1368,7 +1376,7 @@
theTx.rollback();
- if (wasStarted)
+ if (wasStarted && !closing)
{
for (ServerConsumer consumer : consumers.values())
{
12 years, 11 months
JBoss hornetq SVN: r11952 - trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor.
by do-not-reply@jboss.org
Author: borges
Date: 2012-01-03 06:54:41 -0500 (Tue, 03 Jan 2012)
New Revision: 11952
Modified:
trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/PageSubscription.java
Log:
Fix link in javadoc
Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/PageSubscription.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/PageSubscription.java 2012-01-03 11:54:28 UTC (rev 11951)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/PageSubscription.java 2012-01-03 11:54:41 UTC (rev 11952)
@@ -34,21 +34,21 @@
// Cursor query operations --------------------------------------
PagingStore getPagingStore();
-
+
// To be called before the server is down
void stop();
void bookmark(PagePosition position) throws Exception;
-
+
PageSubscriptionCounter getCounter();
-
+
long getMessageCount();
long getId();
boolean isPersistent();
-
- /** Used as a delegate method to pageStore.isPaging() */
+
+ /** Used as a delegate method to {@link PagingStore#isPaging()} */
boolean isPaging();
public LinkedListIterator<PagedReference> iterator();
@@ -75,7 +75,7 @@
void confirmPosition(Transaction tx, PagePosition position) throws Exception;
/**
- *
+ *
* @return the first page in use or MAX_LONG if none is in use
*/
long getFirstPage();
@@ -89,11 +89,11 @@
/**
* To be called when the cursor decided to ignore a position.
- *
+ *
* @param position
*/
void positionIgnored(PagePosition position);
-
+
void lateDeliveryRollback(PagePosition position);
/**
@@ -105,8 +105,8 @@
void processReload() throws Exception;
void addPendingDelivery(final PagePosition position);
-
- /**
+
+ /**
* To be used on redeliveries
* @param position
*/
@@ -122,11 +122,11 @@
/** wait all the scheduled runnables to finish their current execution */
void flushExecutors();
-
+
void setQueue(Queue queue);
-
+
Queue getQueue();
-
+
/**
* To be used to requery the reference case the Garbage Collection removed it from the PagedReference as it's using WeakReferences
* @param pos
12 years, 11 months