From do-not-reply at jboss.org Tue Jan 3 06:55:16 2012
Content-Type: multipart/mixed; boundary="===============0364589336402355969=="
MIME-Version: 1.0
From: do-not-reply at jboss.org
To: hornetq-commits at lists.jboss.org
Subject: [hornetq-commits] JBoss hornetq SVN: r11953 -
trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl.
Date: Tue, 03 Jan 2012 06:55:16 -0500
Message-ID: <201201031155.q03BtGCM014929@svn01.web.mwc.hst.phx2.redhat.com>
--===============0364589336402355969==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
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/ServerSess=
ionImpl.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/Ser=
verSessionImpl.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSes=
sionImpl.java 2012-01-03 11:54:41 UTC (rev 11952)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/server/impl/ServerSes=
sionImpl.java 2012-01-03 11:55:15 UTC (rev 11953)
@@ -76,10 +76,10 @@
import org.hornetq.utils.json.JSONObject;
=
/*
- * Session implementation =
- * =
- * @author Tim Fox =
- * @author Clebert Suconic<=
/a> =
+ * Session implementation
+ *
+ * @author Tim Fox
+ * @author Clebert Suconic<=
/a>
* @author Jeff Mesnil
* @author Andy Taylor
*/
@@ -288,8 +288,7 @@
if (tx !=3D null && tx.getXid() =3D=3D null)
{
// We only rollback local txs on close, not XA tx branches
-
- rollback(failed);
+ rollback(failed, true);
}
=
Set consumersClone =3D new HashSet(c=
onsumers.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) thro=
ws Exception
{
+ rollback(considerLastMessageAsDelivered, false);
+ }
+
+ private void rollback(final boolean considerLastMessageAsDelivered, fin=
al boolean closing) throws Exception
+ {
+
if (tx =3D=3D null)
{
// Might be null if XA
@@ -626,7 +632,7 @@
tx =3D 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 !=3D null)
{
ServerSessionImpl.log.warn("Replacing incomplete LargeMessage wit=
h ID=3D" + currentLargeMessage.getMessageID());
@@ -1292,7 +1298,7 @@
=
// Public
// --------------------------------------------------------------------=
--------
- =
+
public void clearLargeMessage()
{
currentLargeMessage =3D null;
@@ -1345,7 +1351,9 @@
}
}
=
- private void doRollback(final boolean lastMessageAsDelived, final Trans=
action theTx) throws Exception
+ private void
+ doRollback(final boolean lastMessageAsDelived, final Transacti=
on theTx, final boolean closing)
+ =
throws Exception
{
boolean wasStarted =3D started;
=
@@ -1368,7 +1376,7 @@
=
theTx.rollback();
=
- if (wasStarted)
+ if (wasStarted && !closing)
{
for (ServerConsumer consumer : consumers.values())
{
--===============0364589336402355969==--