[jboss-cvs] JBoss Messaging SVN: r7241 - in trunk: docs/user-manual/en and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 8 05:16:29 EDT 2009
Author: timfox
Date: 2009-06-08 05:16:29 -0400 (Mon, 08 Jun 2009)
New Revision: 7241
Modified:
trunk/build-messaging.xml
trunk/docs/user-manual/en/clusters.xml
trunk/docs/user-manual/en/connection-ttl.xml
trunk/src/main/org/jboss/messaging/core/remoting/RemotingConnection.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
trunk/tests/src/org/jboss/messaging/tests/integration/client/TemporaryQueueTest.java
Log:
fixed close listeners issue
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/build-messaging.xml 2009-06-08 09:16:29 UTC (rev 7241)
@@ -782,7 +782,7 @@
<!-- Distribution targets -->
<!-- ======================================================================================== -->
- <target name="distro" depends="jar, jar-core-client, jar-jms-client, validate-configuration">
+ <target name="distro" depends="clean, jar, jar-core-client, jar-jms-client, validate-configuration">
<mkdir dir="${build.distro.dir}"/>
<mkdir dir="${build.distro.lib.dir}"/>
@@ -871,6 +871,7 @@
<exclude name="**/logs/**"/>
<exclude name="**/*.dat"/>
<exclude name="**/*.svn"/>
+ <exclude name="**/*.*~"/>
</fileset>
</copy>
Modified: trunk/docs/user-manual/en/clusters.xml
===================================================================
--- trunk/docs/user-manual/en/clusters.xml 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/docs/user-manual/en/clusters.xml 2009-06-08 09:16:29 UTC (rev 7241)
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="clusters">
- <title>Clusters</title>
- <para>In this chapter we discuss the concepts behind JBoss Messaging clusters, and how to
- configure them.</para>
+ <title>Clusters</title>
<section>
<title>Clusters Overview</title>
<para>JBoss Messaging clusters allow groups of JBoss Messaging servers to be grouped
Modified: trunk/docs/user-manual/en/connection-ttl.xml
===================================================================
--- trunk/docs/user-manual/en/connection-ttl.xml 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/docs/user-manual/en/connection-ttl.xml 2009-06-08 09:16:29 UTC (rev 7241)
@@ -81,8 +81,9 @@
instance, or if you're deploying JMS connection factory instances direct into JNDI on
the server side, you can specify it in the xml config, using the parameter <literal
>connection-ttl</literal>.</para>
- <para>The default value for connection ttl is <literal>300000</literal>ms, i.e. 5
- minutes.</para>
+ <para>The default value for connection ttl is <literal>300000</literal>ms, i.e. 5 minutes. A
+ value of <literal>-1</literal> for <literal>ConnectionTTL</literal> means the server
+ will never time out the connection on the server side.</para>
<para>If you do not wish clients to be able to specify their own connection TTL, you can
override all values used by a global value set on the server side. This can be done by
specifying the <literal>connection-ttl-override</literal> attribute in the server side
@@ -111,8 +112,10 @@
specify it in the <literal>jbm-jms.xml </literal> configuration file, using the
parameter <literal>client-failure-check-period</literal>.</para>
<para>The default value for client failure check period is <literal>5000</literal>ms, i.e. 5
- seconds. Typically this is much lower than connection TTL to allow clients to reconnect
- in case of transitory failure.</para>
+ seconds. A value of <literal>-1</literal> means the client will never fail the
+ connection on the client side if no data is received from the server. Typically this is
+ much lower than connection TTL to allow clients to reconnect in case of transitory
+ failure.</para>
</section>
<section id="connection-ttl.session.multiplexing">
<title>Session Multiplexing</title>
Modified: trunk/src/main/org/jboss/messaging/core/remoting/RemotingConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/RemotingConnection.java 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/src/main/org/jboss/messaging/core/remoting/RemotingConnection.java 2009-06-08 09:16:29 UTC (rev 7241)
@@ -38,6 +38,10 @@
void addFailureListener(FailureListener listener);
boolean removeFailureListener(FailureListener listener);
+
+ void addCloseListener(CloseListener listener);
+
+ boolean removeCloseListener(CloseListener listener);
List<FailureListener> getFailureListeners();
@@ -58,9 +62,7 @@
void freeze();
Connection getTransportConnection();
-
- void addClosingListener(CloseListener listener);
-
+
boolean isDataReceived();
boolean isDataSent();
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/RemotingConnectionImpl.java 2009-06-08 09:16:29 UTC (rev 7241)
@@ -313,11 +313,6 @@
return this.transportConnection;
}
- public void addClosingListener(CloseListener listener)
- {
- closeListeners.add(listener);
- }
-
public List<FailureListener> getFailureListeners()
{
return new ArrayList<FailureListener>(failureListeners);
@@ -373,7 +368,27 @@
return failureListeners.remove(listener);
}
+
+ public void addCloseListener(CloseListener listener)
+ {
+ if (listener == null)
+ {
+ throw new IllegalStateException("CloseListener cannot be null");
+ }
+
+ closeListeners.add(listener);
+ }
+
+ public boolean removeCloseListener(final CloseListener listener)
+ {
+ if (listener == null)
+ {
+ throw new IllegalStateException("CloseListener cannot be null");
+ }
+ return closeListeners.remove(listener);
+ }
+
public MessagingBuffer createBuffer(final int size)
{
return transportConnection.createBuffer(size);
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/MessagingServerImpl.java 2009-06-08 09:16:29 UTC (rev 7241)
@@ -1378,10 +1378,6 @@
channel.setHandler(handler);
- connection.addFailureListener(session);
-
- connection.addClosingListener(session);
-
return new CreateSessionResponseMessage(version.getIncrementingVersion());
}
Modified: trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/src/main/org/jboss/messaging/core/server/impl/ServerSessionImpl.java 2009-06-08 09:16:29 UTC (rev 7241)
@@ -267,6 +267,10 @@
this.replicatingChannel = replicatingChannel;
this.backup = backup;
+
+ remotingConnection.addFailureListener(this);
+
+ remotingConnection.addCloseListener(this);
}
// ServerSession implementation ----------------------------------------------------------------------------
@@ -352,6 +356,8 @@
}
remotingConnection.removeFailureListener(this);
+
+ remotingConnection.removeCloseListener(this);
}
public void promptDelivery(final Queue queue)
@@ -1114,6 +1120,7 @@
}
remotingConnection.removeFailureListener(this);
+ remotingConnection.removeCloseListener(this);
// Note. We do not destroy the replicating connection here. In the case the live server has really crashed
// then the connection will get cleaned up anyway when the server ping timeout kicks in.
@@ -1129,6 +1136,7 @@
remotingConnection = newConnection;
remotingConnection.addFailureListener(this);
+ remotingConnection.addCloseListener(this);
int serverLastReceivedCommandID = channel.getLastReceivedCommandID();
@@ -1401,6 +1409,7 @@
{
try
{
+ log.info("Removing binding for name " + name);
Binding b = postOffice.removeBinding(name);
}
catch (Exception e)
Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/TemporaryQueueTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/TemporaryQueueTest.java 2009-06-08 08:33:59 UTC (rev 7240)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/TemporaryQueueTest.java 2009-06-08 09:16:29 UTC (rev 7241)
@@ -125,7 +125,7 @@
RemotingConnectionImpl conn = (RemotingConnectionImpl) server.getRemotingService().getConnections().iterator().next();
final CountDownLatch latch = new CountDownLatch(1);
- conn.addClosingListener(new CloseListener()
+ conn.addCloseListener(new CloseListener()
{
public void connectionClosed()
{
@@ -193,7 +193,7 @@
.iterator()
.next();
final CountDownLatch latch = new CountDownLatch(1);
- remotingConnection.addClosingListener(new CloseListener()
+ remotingConnection.addCloseListener(new CloseListener()
{
public void connectionClosed()
{
More information about the jboss-cvs-commits
mailing list