Author: jmesnil
Date: 2009-12-01 12:44:47 -0500 (Tue, 01 Dec 2009)
New Revision: 8481
Modified:
trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
fixed previous commit
* if a SESSION_CREATION_REJECTED was thrown, the do block was looping for ever...
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-01 16:59:49
UTC (rev 8480)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-01 17:44:47
UTC (rev 8481)
@@ -830,19 +830,20 @@
try
{
channel1.sendBlocking(createRequest);
+ retry = false;
}
catch(HornetQException e)
{
// the session was created while its server was starting, retry it:
if (e.getCode() == HornetQException.SESSION_CREATION_REJECTED)
{
- log.warn("Server is starting, retry to create the
session");
-
+ log.warn("Server is starting, retry to create the session
" + name);
retry = true;
- continue;
}
}
} while(retry);
+
+ log.info("created session " + name);
channel.clearCommands();
Show replies by date