[jboss-cvs] JBoss Messaging SVN: r6686 - in trunk/src/main/org/jboss/messaging: core/exception and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 6 05:45:37 EDT 2009
Author: timfox
Date: 2009-05-06 05:45:37 -0400 (Wed, 06 May 2009)
New Revision: 6686
Modified:
trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java
trunk/src/main/org/jboss/messaging/core/exception/MessagingException.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
Log:
tweaks
Modified: trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java 2009-05-06 09:00:47 UTC (rev 6685)
+++ trunk/src/main/org/jboss/messaging/core/client/impl/ConnectionManagerImpl.java 2009-05-06 09:45:37 UTC (rev 6686)
@@ -22,6 +22,7 @@
package org.jboss.messaging.core.client.impl;
+import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.DISCONNECT;
import static org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl.EARLY_RESPONSE;
import java.util.ArrayList;
@@ -51,6 +52,7 @@
import org.jboss.messaging.core.remoting.impl.RemotingConnectionImpl;
import org.jboss.messaging.core.remoting.impl.wireformat.CreateSessionMessage;
import org.jboss.messaging.core.remoting.impl.wireformat.CreateSessionResponseMessage;
+import org.jboss.messaging.core.remoting.impl.wireformat.PacketImpl;
import org.jboss.messaging.core.remoting.spi.Connection;
import org.jboss.messaging.core.remoting.spi.ConnectionLifeCycleListener;
import org.jboss.messaging.core.remoting.spi.Connector;
@@ -502,7 +504,7 @@
// It can then release the channel 1 lock, and retry (which will cause locking on failoverLock
// until failover is complete
- boolean attemptFailover = (backupConnectorFactory) != null && (failoverOnServerShutdown || me.getCode() != MessagingException.SERVER_DISCONNECTED);
+ boolean attemptFailover = (backupConnectorFactory) != null && (failoverOnServerShutdown || me.getCode() != MessagingException.DISCONNECTED);
boolean done = false;
@@ -773,21 +775,14 @@
connections.clear();
for (ConnectionEntry entry : copy)
- {
+ {
try
{
entry.connection.destroy();
}
catch (Throwable ignore)
{
- }
- // try
- // {
- // entry.connector.close();
- // }
- // catch (Throwable ignore)
- // {
- // }
+ }
}
mapIterator = null;
Modified: trunk/src/main/org/jboss/messaging/core/exception/MessagingException.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/exception/MessagingException.java 2009-05-06 09:00:47 UTC (rev 6685)
+++ trunk/src/main/org/jboss/messaging/core/exception/MessagingException.java 2009-05-06 09:45:37 UTC (rev 6686)
@@ -45,7 +45,7 @@
public static final int INTERRUPTED = 004;
- public static final int SERVER_DISCONNECTED = 005;
+ public static final int DISCONNECTED = 005;
public static final int QUEUE_DOES_NOT_EXIST = 100;
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-05-06 09:00:47 UTC (rev 6685)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-05-06 09:45:37 UTC (rev 6686)
@@ -1751,7 +1751,7 @@
}
else if (type == PacketImpl.DISCONNECT)
{
- fail(new MessagingException(MessagingException.SERVER_DISCONNECTED, "The connection was closed by the server"));
+ fail(new MessagingException(MessagingException.DISCONNECTED, "The connection was closed by the server"));
}
else
{
Modified: trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-05-06 09:00:47 UTC (rev 6685)
+++ trunk/src/main/org/jboss/messaging/core/remoting/server/impl/RemotingServiceImpl.java 2009-05-06 09:45:37 UTC (rev 6686)
@@ -290,7 +290,7 @@
}
public void connectionDestroyed(final Object connectionID)
- {
+ {
RemotingConnection conn = connections.get(connectionID);
if (conn != null)
@@ -309,7 +309,7 @@
}
public void connectionException(final Object connectionID, final MessagingException me)
- {
+ {
//We DO NOT call fail on connection exception, otherwise in event of real connection failure, the
//connection will be failed, the session will be closed and won't be able to reconnect
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-05-06 09:00:47 UTC (rev 6685)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-05-06 09:45:37 UTC (rev 6686)
@@ -450,14 +450,14 @@
{
if (connections.remove(connectionID) != null)
{
- // Execute on different thread to avoid deadlocks
- new Thread()
- {
- public void run()
- {
+// // Execute on different thread to avoid deadlocks
+// new Thread()
+// {
+// public void run()
+// {
listener.connectionDestroyed(connectionID);
- }
- }.start();
+ // }
+ // }.start();
}
}
More information about the jboss-cvs-commits
mailing list