[jboss-cvs] JBoss Messaging SVN: r3078 - in trunk: docs/examples and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 29 21:17:10 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-08-29 21:17:09 -0400 (Wed, 29 Aug 2007)
New Revision: 3078
Modified:
trunk/build-messaging.xml
trunk/docs/examples/common/src/org/jboss/example/jms/common/ExampleSupport.java
trunk/docs/examples/distributed-queue/src/org/jboss/example/jms/distributedqueue/DistributedQueueExample.java
trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java
trunk/docs/examples/examples.properties
trunk/docs/examples/http/build.xml
trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java
trunk/docs/examples/secure-socket/build.xml
trunk/util/release-admin.xml
Log:
http://jira.jboss.com/jira/browse/JBMESSAGING-1043
Modified: trunk/build-messaging.xml
===================================================================
--- trunk/build-messaging.xml 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/build-messaging.xml 2007-08-30 01:17:09 UTC (rev 3078)
@@ -386,7 +386,7 @@
<include name="org/jboss/jms/exception/*.class"/>
<include name="org/jboss/jms/wireformat/*.class"/>
<include name="org/jboss/messaging/util/**/*.class"/>
- <include name="org/jboss/messaging/core/impl/message/**/*.class"/>
+ <include name="org/jboss/messaging/core/impl/message/**/*.class"/>
<include name="org/jboss/messaging/core/contract/**/*.class"/>
<include name="org/jboss/jms/server/remoting/**/*.class"/>
</fileset>
@@ -480,6 +480,9 @@
<include name="*-persistence-service.xml"/>
<include name="*-ds.xml"/>
</fileset>
+ <fileset dir="./src/etc/remoting">
+ <include name="*-service.xml"/>
+ </fileset>
</copy>
</target>
Modified: trunk/docs/examples/common/src/org/jboss/example/jms/common/ExampleSupport.java
===================================================================
--- trunk/docs/examples/common/src/org/jboss/example/jms/common/ExampleSupport.java 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/common/src/org/jboss/example/jms/common/ExampleSupport.java 2007-08-30 01:17:09 UTC (rev 3078)
@@ -8,12 +8,15 @@
import javax.jms.Connection;
import javax.jms.ConnectionMetaData;
+import javax.jms.ConnectionFactory;
import javax.naming.InitialContext;
import org.jboss.example.jms.common.bean.Management;
import org.jboss.example.jms.common.bean.ManagementHome;
import org.jboss.jms.client.JBossConnection;
+import org.jboss.jms.client.JBossConnectionFactory;
import org.jboss.jms.client.delegate.DelegateSupport;
+import org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate;
import org.jboss.jms.client.state.ConnectionState;
/**
@@ -246,7 +249,22 @@
System.out.println("#####################");
System.exit(0);
}
-
+
+ // this is not necessary in real applications.. This is to avoid a client disconnect message on the server
+ // since clustered connection factories are connected objects that will receive notifications
+ // on the topology
+ protected void releaseClusteredCF(ConnectionFactory cf)
+ {
+ try
+ {
+ ((ClientClusteredConnectionFactoryDelegate)
+ ((JBossConnectionFactory)cf).getDelegate()).closeCallback();
+ }
+ catch (Exception ignored)
+ {
+ }
+ }
+
// Inner classes -------------------------------------------------
-
+
}
Modified: trunk/docs/examples/distributed-queue/src/org/jboss/example/jms/distributedqueue/DistributedQueueExample.java
===================================================================
--- trunk/docs/examples/distributed-queue/src/org/jboss/example/jms/distributedqueue/DistributedQueueExample.java 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/distributed-queue/src/org/jboss/example/jms/distributedqueue/DistributedQueueExample.java 2007-08-30 01:17:09 UTC (rev 3078)
@@ -56,13 +56,15 @@
Connection connection0 = null;
Connection connection1 = null;
+ ConnectionFactory cf = null;
+
try
{
// connecting to the first node
ic = new InitialContext();
- ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
+ cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
Queue distributedQueue = (Queue)ic.lookup(destinationName);
log("Distributed queue " + destinationName + " exists");
@@ -151,6 +153,11 @@
log("Could not close connection " + connection1 + ", exception was " + e);
throw e;
}
+
+ // this is not necessary in real applications.. This is to avoid a client disconnect message on the server
+ // since clustered connection factories are connected objects that will receive notifications
+ // on the topology
+ releaseClusteredCF(cf);
}
}
Modified: trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java
===================================================================
--- trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/distributed-topic/src/org/jboss/example/jms/distributedtopic/DistributedTopicExample.java 2007-08-30 01:17:09 UTC (rev 3078)
@@ -56,13 +56,14 @@
Connection connection0 = null;
Connection connection1 = null;
+ ConnectionFactory cf = null;
try
{
// connecting to the first node
ic = new InitialContext();
- ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
+ cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
Topic distributedTopic = (Topic)ic.lookup(destinationName);
log("Distributed topic " + destinationName + " exists");
@@ -165,6 +166,11 @@
log("Could not close connection " + connection1 + ", exception was " + e);
throw e;
}
+
+ // this is not necessary in real applications.. This is to avoid a client disconnect message on the server
+ // since clustered connection factories are connected objects that will receive notifications
+ // on the topology
+ releaseClusteredCF(cf);
}
}
Modified: trunk/docs/examples/examples.properties
===================================================================
--- trunk/docs/examples/examples.properties 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/examples.properties 2007-08-30 01:17:09 UTC (rev 3078)
@@ -1 +1,2 @@
messaging.client.jar.path=../../../output/lib
+remoting.path=../../../src/etc/remoting
Modified: trunk/docs/examples/http/build.xml
===================================================================
--- trunk/docs/examples/http/build.xml 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/http/build.xml 2007-08-30 01:17:09 UTC (rev 3078)
@@ -14,6 +14,7 @@
<!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
<property file="../examples.properties"/>
+ <property name="remoting.path" value="../config"/>
<property name="messaging.client.jar.path" value="../../"/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
@@ -73,7 +74,7 @@
</target>
<target name="deploy">
- <copy file="../../../src/etc/remoting/remoting-http-service.xml"
+ <copy file="${remoting.path}/remoting-http-service.xml"
todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
<copy file="./etc/messaging-http-service.xml"
todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
Modified: trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java
===================================================================
--- trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/queue-failover/src/org/jboss/example/jms/failover/QueueFailoverExample.java 2007-08-30 01:17:09 UTC (rev 3078)
@@ -57,13 +57,16 @@
Connection connection = null;
+
+ ConnectionFactory cf = null;
+
try
{
// Create a connection to the clustered messaging instance
ic = new InitialContext();
- ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
+ cf = (ConnectionFactory)ic.lookup("/ClusteredConnectionFactory");
Queue distributedQueue = (Queue)ic.lookup(destinationName);
log("Distributed queue " + destinationName + " exists");
@@ -143,6 +146,12 @@
log("Could not close connection " + connection + ", exception was " + e);
throw e;
}
+
+ // this is not necessary in real applications.. This is to avoid a client disconnect message on the server
+ // since clustered connection factories are connected objects that will receive notifications
+ // on the topology
+ releaseClusteredCF(cf);
+
}
}
Modified: trunk/docs/examples/secure-socket/build.xml
===================================================================
--- trunk/docs/examples/secure-socket/build.xml 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/docs/examples/secure-socket/build.xml 2007-08-30 01:17:09 UTC (rev 3078)
@@ -14,6 +14,7 @@
<!-- These properties may be overriden by calling ants when this example is used in a smoke test -->
<property file="../examples.properties"/>
+ <property name="remoting.path" value="../config"/>
<property name="messaging.client.jar.path" value="../.."/>
<property name="messaging.client.jar.name" value="jboss-messaging-client.jar"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
@@ -78,7 +79,7 @@
<target name="deploy">
<copy file="./etc/messaging.keystore"
todir="${jboss.home}/server/${jboss.configuration}/deploy/jboss-messaging.sar"/>
- <copy file="../../../src/etc/remoting/remoting-sslbisocket-service.xml"
+ <copy file="${remoting.path}/remoting-sslbisocket-service.xml"
todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
<copy file="./etc/messaging-secure-socket-service.xml"
todir="${jboss.home}/server/${jboss.configuration}/deploy"/>
Modified: trunk/util/release-admin.xml
===================================================================
--- trunk/util/release-admin.xml 2007-08-30 00:51:37 UTC (rev 3077)
+++ trunk/util/release-admin.xml 2007-08-30 01:17:09 UTC (rev 3078)
@@ -123,6 +123,10 @@
<!-- Copy the JMS provider loader stuff -->
<copy todir="${jboss.home}/server/${messaging.config.name}/deploy">
<fileset dir="${jboss.home}/server/${messaging.config.source}/deploy/jms" includes="jms-ds.xml,hajndi-jms-ds.xml"/>
+ <filterset begintoken=""" endtoken=""">
+ <filter token="jboss.mq:service=JMSProviderLoader,name=JMSProvider" value=""jboss.messaging:service=JMSProviderLoader,name=JMSProvider""/>
+ <filter token="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool" value=""jboss.messaging:service=ServerSessionPoolMBean,name=StdJMSPool""/>
+ </filterset>
</copy>
</target>
More information about the jboss-cvs-commits
mailing list