[jboss-cvs] JBoss Messaging SVN: r6802 - in trunk: examples/javaee/common and 30 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 15 07:05:43 EDT 2009
Author: ataylor
Date: 2009-05-15 07:05:43 -0400 (Fri, 15 May 2009)
New Revision: 6802
Added:
trunk/examples/javaee/ejb-jms-transaction/config/ant.properties
trunk/examples/javaee/ejb-jms-transaction/server/
trunk/examples/javaee/ejb-jms-transaction/server/jbm-configuration.xml
trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml
trunk/examples/javaee/ejb-jms-transaction/server/jbm-users.xml
trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml
trunk/examples/javaee/jca-config/config/ant.properties
trunk/examples/javaee/jca-config/server/
trunk/examples/javaee/jca-config/server/jbm-configuration.xml
trunk/examples/javaee/jca-config/server2/
trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml
trunk/examples/javaee/jca-config/server2/ra.xml
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/MDBQueueB.java
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSender.java
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSenderService.java
trunk/examples/javaee/jms-bridge/config/ant.properties
trunk/examples/javaee/jms-bridge/server/
trunk/examples/javaee/jms-bridge/server/jbm-configuration.xml
trunk/examples/javaee/jms-bridge/server/jbm-jms.xml
trunk/examples/javaee/jms-bridge/server/jbm-users.xml
trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml
trunk/examples/javaee/mdb/config/ant.properties
trunk/examples/javaee/mdb/server/
trunk/examples/javaee/mdb/server/jbm-configuration.xml
trunk/examples/javaee/mdb/server/jbm-jms.xml
trunk/examples/javaee/mdb/server/jbm-users.xml
trunk/examples/javaee/servlet-transport/config/META-INF/
trunk/examples/javaee/servlet-transport/config/META-INF/application.xml
trunk/examples/javaee/servlet-transport/config/WEB-INF/
trunk/examples/javaee/servlet-transport/config/WEB-INF/web.xml
trunk/examples/javaee/servlet-transport/config/ant.properties
trunk/examples/javaee/servlet-transport/server/
trunk/examples/javaee/servlet-transport/server/jbm-configuration.xml
trunk/examples/javaee/servlet-transport/server/jbm-jms.xml
trunk/examples/javaee/servlet-transport/server/jbm-users.xml
trunk/examples/javaee/xarecovery/config/ant.properties
trunk/examples/javaee/xarecovery/server/
trunk/examples/javaee/xarecovery/server/jbm-configuration.xml
trunk/examples/javaee/xarecovery/server/jbm-jms.xml
trunk/examples/javaee/xarecovery/server/jbm-users.xml
Removed:
trunk/examples/javaee/ejb-jms-transaction/config/jbm-jms.xml
trunk/examples/javaee/ejb-jms-transaction/config/jbm-queues.xml
trunk/examples/javaee/ejb-jms-transaction/config/mysql-ds.xml
trunk/examples/javaee/jca-config/server-config/
trunk/examples/javaee/jca-config/server/alternate-ra.xml
trunk/examples/javaee/jca-config/server/jbm-queues.xml
trunk/examples/javaee/jca-config/server/jms-remote-ds.xml
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueB.java
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSender.java
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSenderService.java
trunk/examples/javaee/jms-bridge/config/jbm-jms.xml
trunk/examples/javaee/jms-bridge/config/jbm-queues.xml
trunk/examples/javaee/jms-bridge/config/jms-bridge-jboss-beans.xml
trunk/examples/javaee/mdb/config/jbm-jms.xml
trunk/examples/javaee/mdb/config/jbm-queues.xml
trunk/examples/javaee/servlet-transport/config/jbm-jms.xml
trunk/examples/javaee/servlet-transport/config/jbm-queues.xml
trunk/examples/javaee/servlet-transport/config/jms-servlet.war/
trunk/examples/javaee/xarecovery/config/jbm-jms.xml
trunk/examples/javaee/xarecovery/config/jbm-queues.xml
Modified:
trunk/docs/user-manual/en/modules/appserver-integration.xml
trunk/examples/javaee/common/build.xml
trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/EJBClientExample.java
trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java
trunk/examples/javaee/hajndi/src/org/jboss/javaee/example/HAJNDIExample.java
trunk/examples/javaee/jca-config/build.xml
trunk/examples/javaee/jca-config/config/jndi.properties
trunk/examples/javaee/jca-config/server/jbm-jms.xml
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/MDBRemoteClientExample.java
trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueA.java
trunk/examples/javaee/jms-bridge/build.xml
trunk/examples/javaee/mdb/build.xml
trunk/examples/javaee/servlet-transport/build.xml
trunk/examples/javaee/servlet-transport/src/org/jboss/javaee/example/ServletTransportExample.java
trunk/examples/javaee/xarecovery/src/org/jboss/javaee/example/XARecoverySenderExample.java
trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
Log:
revamped examples
Modified: trunk/docs/user-manual/en/modules/appserver-integration.xml
===================================================================
--- trunk/docs/user-manual/en/modules/appserver-integration.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/docs/user-manual/en/modules/appserver-integration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,10 +1,296 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="xa-recovery">
<title>Application Server Integration and JavaEE</title>
- <para>blah</para>
+ <para>JBM is fully integrated with the JBoss Application Server version 5.1. For details on
+ installing JBM in the AS refer to Quick Start guide.</para>
+ <para>This section explains the basics behind configuring the different JEE components in the
+ AS.</para>
<section>
<title>Using and Configuring the JCA Adapter</title>
- <para>blah</para>
+ <para>The Java Connector Architecture (JCA) Adapter is what allows JBM to be integrated with
+ JEE components such as MDB's and EJB's. It configures how components such as MDB's
+ consume messages from the JBM server and also how components can send messages.</para>
+ <para>The JBM JCA adapter is deployed via the <literal>jms-ra.rar</literal> archive. The
+ configuration of the Adapter is found in this archive under <literal
+ >META-INF/ra.xml</literal>.</para>
+ <para>The configuration will look something like the following:</para>
+ <programlisting><resourceadapter>
+ <resourceadapter-class>org.jboss.messaging.ra.JBMResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+ <config-property-name>ConnectorClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>ConnectionParameters</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>jbm.remoting.invm.serverid=0</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Use XA methods to obtain connections?</description>
+ <config-property-name>UseXA</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>true</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.messaging.ra.JBMManagedConnectionFactory</managedconnectionfactory-class>
+
+ <config-property>
+ <description>The default session type</description>
+ <config-property-name>SessionDefaultType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>javax.jms.Queue</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
+ <config-property-name>UseTryLock</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
+
+ <connectionfactory-interface>org.jboss.messaging.ra.JBMConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.messaging.ra.JBMConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.jboss.messaging.ra.JBMSession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism>
+ <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+ <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.jboss.messaging.ra.inflow.JBMActivationSpec</activationspec-class>
+ <required-config-property>
+ <config-property-name>destination</config-property-name>
+ </required-config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+
+ </resourceadapter></programlisting>
+ <para>There are 3 main parts to this configuration.</para>
+ <orderedlist>
+ <listitem>
+ <para>A set of global properties for the Adapter</para>
+ </listitem>
+ <listitem>
+ <para>The configuration for the outbound part of the adapter. This is used for
+ creating JMS resources within EE components</para>
+ </listitem>
+ <listitem>
+ <para>The configuration of the inbound part of the adapter. This is used for
+ controlling the consumption of messages via MDB's.</para>
+ </listitem>
+ </orderedlist>
+ <section>
+ <title>Adapter Global properties</title>
+ <para>The first element you see is <literal>resourceadapter-class</literal> which should
+ be left unchanged. This is the JBM resource adapter class.</para>
+ <para>After that there is a list of configuration properties. This will be where most of
+ the configuration is done. The first 2 configure the transport used by the adapter
+ and the rest configure the connection itself.</para>
+ <para>The following table explains what each property is for.</para>
+ <table frame="all" border="2">
+ <title>Global Configuration Properties</title>
+ <tgroup cols="3">
+ <colspec colname="c1" colnum="1" colwidth="0.55*"/>
+ <colspec colname="c2" colnum="2" colwidth="0.31*"/>
+ <colspec colname="c3" colnum="3" colwidth="2.14*"/>
+ <thead>
+ <row>
+ <entry>Property Name</entry>
+ <entry>Property Type</entry>
+ <entry>Property Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ConnectorClassName</entry>
+ <entry>java.lang.String</entry>
+ <entry>The Connector class name see <xref
+ linkend="configuring-transports"/> for info on available
+ connectors</entry>
+ </row>
+ <row>
+ <entry>ConnectionParameters</entry>
+ <entry>java.lang.String</entry>
+ <entry>The transport configuration. These values must be in the form of
+ key=val;key=val; and will be specific to the connector used</entry>
+ </row>
+ <row>
+ <entry>UseXA</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>UserName</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>Password</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>BackUpTransportType</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>TransportConfiguration</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>DiscoveryGroupAddress</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>DiscoveryGroupPort</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>DiscoveryRefreshTimeout</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>DiscoveryInitialWaitTimeout</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>LoadBalancingPolicyClassName</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>PingPeriod</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ConnectionTTL</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>CallTimeout</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>DupsOKBatchSize</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>TransactionBatchSize</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ConsumerWindowSize</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ConsumerMaxRate</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ProducerWindowSize</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ProducerMaxRate</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>MinLargeMessageSize</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>BlockOnAcknowledge</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>BlockOnNonPersistentSend</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>BlockOnPersistentSend</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>AutoGroup</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>MaxConnections</entry>
+ <entry>java.lang.Integer</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>PreAcknowledge</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>RetryInterval</entry>
+ <entry>java.lang.Long</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>RetryIntervalMultiplier</entry>
+ <entry>java.lang.Double</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>FailoverOnServerShutdown</entry>
+ <entry>java.lang.Boolean</entry>
+ <entry/>
+ </row>
+ <row>
+ <entry>ClientID</entry>
+ <entry>java.lang.String</entry>
+ <entry/>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Adapter Outbound configuration</title>
+ <para>blah</para>
+ </section>
+ <section>
+ <title>Adapter Inbound configuration</title>
+ <para>blah</para>
+ </section>
</section>
<section>
<title>Using JBM with MDBs in JBoss AS</title>
Modified: trunk/examples/javaee/common/build.xml
===================================================================
--- trunk/examples/javaee/common/build.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/common/build.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -28,6 +28,9 @@
<project default="compile" name="javaeeexample" basedir=".">
<dirname property="imported.basedir" file="${ant.file.javaeeexample}"/>
<property file="${imported.basedir}/config/ant.properties"/>
+ <property name="example.config.dir" value="config"/>
+ <property file="${example.config.dir}/ant.properties"/>
+ <property name="example.server.dir" value="server"/>
<property environment="ENV"/>
<property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
@@ -100,56 +103,65 @@
</target>
<target name="jar" depends="compile">
- <jar destfile="${build.dir}/mdb-example.jar"
+ <jar destfile="${build.dir}/${example.name}-example.jar"
basedir="${classes.dir}"
includes="org/jboss/javaee/example/server/**/*">
</jar>
</target>
- <target name="ear" depends="jar">
- <jar destfile="${build.dir}/mdb-example.ear" basedir="${build.dir}">
- <include name="mdb-example.jar"/>
- </jar>
+ <target name="war" depends="jar">
+ <jar destfile="${build.dir}/${example.name}-example.war" basedir="${example.config.dir}"
+ includes="WEB-INF/**/*"/>
</target>
- <target name="deploy" depends="validate-jboss">
- <property name="deploy.dir" value="${jboss.home}/server/default-with-jbm2/deploy/" />
- <antcall target="deploy-resources">
- <param name="deploy.dir" value="${deploy.dir}"/>
- </antcall>
- <antcall target="deploy-ear">
- <param name="deploy.dir" value="${deploy.dir}"/>
- </antcall>
- <antcall target="deploy-misc">
- <param name="deploy.dir" value="${deploy.dir}"/>
- </antcall>
+ <target name="ear" depends="war">
+ <jar destfile="${build.dir}/${example.name}-example.ear" basedir="${build.dir}">
+ <include name="${example.name}-example.jar"/>
+ <include name="${example.name}-example.war"/>
+ <fileset dir="${example.config.dir}">
+ <include name="META-INF/**"/>
+ </fileset>
+ </jar>
</target>
- <target name="deploy-ear" depends="ear">
- <!-- some examples may choose to do a little extra on deploy and call this target directly -->
- <copy file="${build.dir}/mdb-example.ear" todir="${deploy.dir}"/>
- </target>
+ <target name="deploy" depends="validate-jboss, copy-profile, ear">
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <copy todir="${example-profile}/deploy/messaging.sar">
+ <fileset dir="${example.server.dir}"/>
+ </copy>
+ <copy todir="${example-profile}/deploy/">
+ <fileset dir="${build.dir}">
+ <include name="${example.name}-example.ear"/>
+ </fileset>
+ </copy>
- <target name="deploy-resources">
- <copy file="${example.config.dir}/jbm-queues.xml" todir="${deploy.dir}/messaging.sar/" failonerror="false" />
- <copy file="${example.config.dir}/jbm-jms.xml" todir="${deploy.dir}/messaging.sar/" failonerror="false" />
- <sleep seconds="5"/>
+ <exec dir="${jboss.home}/bin" command="./run.sh -c ${example.name}-example-profile"/>
</target>
- <target name="deploy-misc">
+ <target name="copy-profile" depends="profile.check" unless="donot.copy.profile">
+ <property name="profile" value="${jboss.home}/server/default-with-jbm2"/>
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <property name="deploy.dir" value="${example-profile}/deploy/"/>
+ <mkdir dir="${example-profile}"/>
+ <copy todir="${example-profile}">
+ <fileset dir="${profile}">
+ <exclude name="**/*jbm-configuration.xml"/>
+ <exclude name="**/*jbm-jms.xml"/>
+ <exclude name="**/*jbm-users.xml"/>
+ </fileset>
+ </copy>
</target>
- <target name="undeploy-misc">
+ <target name="profile.check">
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <condition property="donot.copy.profile">
+ <available file="${example-profile}" type="dir"/>
+ </condition>
</target>
<target name="undeploy" depends="validate-jboss">
- <property name="deploy.dir" value="${jboss.home}/server/default-with-jbm2/deploy/" />
- <antcall target="undeploy-misc">
- <param name="deploy.dir" value="${deploy.dir}"/>
- </antcall>
- <delete file="${deploy.dir}/mdb-example.ear"/>
- <delete file="${deploy.dir}/messaging.sar/jbm-queues.xml" failonerror="false" />
- <delete file="${deploy.dir}/messaging.sar/jbm-jms.xml" failonerror="false" />
+ <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+ <delete dir="${example-profile}"/>
</target>
<target name="validate-jboss">
@@ -158,7 +170,7 @@
<fail unless="default-config" message="${jboss.home}/server/default-with-jbm2 not found!"/>
</target>
- <target name="runExample" depends="compile">
+ <target name="runExample" depends="validate-jboss,compile">
<java classname="${example.classname}" fork="true">
<classpath refid="jms.runtime.classpath"/>
</java>
Added: trunk/examples/javaee/ejb-jms-transaction/config/ant.properties
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/config/ant.properties (rev 0)
+++ trunk/examples/javaee/ejb-jms-transaction/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=ejb-jms-transaction
\ No newline at end of file
Deleted: trunk/examples/javaee/ejb-jms-transaction/config/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/config/jbm-jms.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/ejb-jms-transaction/config/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,16 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
- <connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="testQueue">
- <entry name="/queue/testQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted: trunk/examples/javaee/ejb-jms-transaction/config/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/config/jbm-queues.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/ejb-jms-transaction/config/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,25 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.testQueue">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <clustered>false</clustered>
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>-1</max-size-bytes>
- <page-size-bytes>10485760</page-size-bytes>
- <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-</configuration>
Deleted: trunk/examples/javaee/ejb-jms-transaction/config/mysql-ds.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/config/mysql-ds.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/ejb-jms-transaction/config/mysql-ds.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- $Id: mysql-ds.xml 41017 2006-02-07 14:26:14Z acoliver $ -->
-<!-- Datasource config for MySQL using 3.0.9 available from:
-http://www.mysql.com/downloads/api-jdbc-stable.html
--->
-
-<datasources>
- <xa-datasource>
- <jndi-name>XADS</jndi-name>
- <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
- <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/jbossdb</xa-datasource-property>
- <user-name>jboss</user-name>
- <password>jboss</password>
- <track-connection-by-tx>true</track-connection-by-tx>
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
- <metadata>
- <type-mapping>mySQL</type-mapping>
- </metadata>
- </xa-datasource>
-
- <local-tx-datasource>
- <jndi-name>DefaultDS</jndi-name>
- <connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
- <driver-class>com.mysql.jdbc.Driver</driver-class>
- <user-name>jboss</user-name>
- <password>jboss</password>
- <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
- <!-- should only be used on drivers after 3.22.1 with "ping" support
- <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
- -->
- <!-- sql to call when connection is created
- <new-connection-sql>some arbitrary sql</new-connection-sql>
- -->
- <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
- <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
- -->
-
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
- <metadata>
- <type-mapping>mySQL</type-mapping>
- </metadata>
- </local-tx-datasource>
-</datasources>
-
Added: trunk/examples/javaee/ejb-jms-transaction/server/jbm-configuration.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/ejb-jms-transaction/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,53 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <!-- Connectors -->
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+
+ </connectors>
+
+ <!-- Acceptors -->
+ <acceptors>
+ <!-- In VM acceptor -->
+ <acceptor name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
+ </acceptor>
+
+ <!-- Netty TCP Acceptor -->
+ <acceptor name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.queue.testQueue">
+ <permission type="consume" roles="guest,publisher"/>
+ <permission type="send" roles="guest,publisher"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <clustered>false</clustered>
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>-1</max-size-bytes>
+ <page-size-bytes>10485760</page-size-bytes>
+ <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ </address-setting>
+ </address-settings>
+
+
+</configuration>
Copied: trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml (from rev 6789, trunk/examples/javaee/ejb-jms-transaction/config/jbm-jms.xml)
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml (rev 0)
+++ trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,16 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty-connector"/>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ <entry name="XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="testQueue">
+ <entry name="/queue/testQueue"/>
+ </queue>
+</configuration>
\ No newline at end of file
Added: trunk/examples/javaee/ejb-jms-transaction/server/jbm-users.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/jbm-users.xml (rev 0)
+++ trunk/examples/javaee/ejb-jms-transaction/server/jbm-users.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Copied: trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml (from rev 6789, trunk/examples/javaee/ejb-jms-transaction/config/mysql-ds.xml)
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml (rev 0)
+++ trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: mysql-ds.xml 41017 2006-02-07 14:26:14Z acoliver $ -->
+<!-- Datasource config for MySQL using 3.0.9 available from:
+http://www.mysql.com/downloads/api-jdbc-stable.html
+-->
+
+<datasources>
+ <xa-datasource>
+ <jndi-name>XADS</jndi-name>
+ <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
+ <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/jbossdb</xa-datasource-property>
+ <user-name>jboss</user-name>
+ <password>jboss</password>
+ <track-connection-by-tx>true</track-connection-by-tx>
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+ </xa-datasource>
+
+ <local-tx-datasource>
+ <jndi-name>DefaultMessagingDS</jndi-name>
+ <connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
+ <driver-class>com.mysql.jdbc.Driver</driver-class>
+ <user-name>jboss</user-name>
+ <password>jboss</password>
+ <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
+ <!-- should only be used on drivers after 3.22.1 with "ping" support
+ <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
+ -->
+ <!-- sql to call when connection is created
+ <new-connection-sql>some arbitrary sql</new-connection-sql>
+ -->
+ <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
+ <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
+ -->
+
+ <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
+ <metadata>
+ <type-mapping>mySQL</type-mapping>
+ </metadata>
+ </local-tx-datasource>
+</datasources>
+
Modified: trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/EJBClientExample.java
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/EJBClientExample.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/EJBClientExample.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -21,6 +21,8 @@
*/
package org.jboss.javaee.example;
+import org.jboss.javaee.example.server.SendMessageService;
+
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageConsumer;
@@ -29,8 +31,6 @@
import javax.jms.TextMessage;
import javax.naming.InitialContext;
-import org.jboss.javaee.example.server.SendMessageService;
-
/**
* An example showing how to invoke a EJB which sends a JMS message and update a JDBC table in the same transaction.
*
@@ -49,7 +49,7 @@
initialContext = new InitialContext();
// Step 2. Lookup the EJB
- SendMessageService service = (SendMessageService)initialContext.lookup("mdb-example/SendMessageBean/remote");
+ SendMessageService service = (SendMessageService)initialContext.lookup("ejb-jms-transaction-example/SendMessageBean/remote");
// Step 3. Create the DB table which will be updated
service.createTable();
Modified: trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -21,8 +21,6 @@
*/
package org.jboss.javaee.example.server;
-import java.sql.PreparedStatement;
-
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jms.Connection;
@@ -33,6 +31,7 @@
import javax.jms.TextMessage;
import javax.naming.InitialContext;
import javax.sql.DataSource;
+import java.sql.PreparedStatement;
/**
* An EJB which sends a JMS message and update a JDBC table in the same transaction.
@@ -50,7 +49,7 @@
public void createTable() throws Exception
{
InitialContext ic = new InitialContext();
- DataSource ds = (DataSource)ic.lookup("java:/DefaultDS");
+ DataSource ds = (DataSource)ic.lookup("java:/DefaultMessagingDS");
java.sql.Connection con = ds.getConnection();
// check if the table exists:
Modified: trunk/examples/javaee/hajndi/src/org/jboss/javaee/example/HAJNDIExample.java
===================================================================
--- trunk/examples/javaee/hajndi/src/org/jboss/javaee/example/HAJNDIExample.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/hajndi/src/org/jboss/javaee/example/HAJNDIExample.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -21,11 +21,10 @@
*/
package org.jboss.javaee.example;
-import java.util.Hashtable;
-
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.naming.InitialContext;
+import java.util.Hashtable;
/**
*
Modified: trunk/examples/javaee/jca-config/build.xml
===================================================================
--- trunk/examples/javaee/jca-config/build.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/build.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -29,47 +29,85 @@
<import file="../common/build.xml"/>
- <target name="deploy">
- <property name="deploy.dir" value="${jboss.home}/server/default-with-jbm2/deploy/" />
- <property name="deploy.dir2" value="${jboss.home}/server/default-with-jbm2_2/deploy/" />
+ <target name="jar2" depends="compile">
+ <jar destfile="${build.dir}/jca-config-example2.jar"
+ basedir="${classes.dir}"
+ includes="org/jboss/javaee/example/server2/**/*">
+ </jar>
+ </target>
+ <target name="ear2" depends="jar2">
+ <jar destfile="${build.dir}/jca-config-example2.ear" basedir="${build.dir}">
+ <include name="jca-config-example2.jar"/>
+ </jar>
+ </target>
+ <target name="deploy2" depends="ear2">
+ <property name="deploy.dir" value="${jboss.home}/server/jca-config-example-profile/" />
+ <property name="deploy.dir2" value="${jboss.home}/server/jca-config-example-profile2/" />
+
+ <mkdir dir="${deploy.dir2}"/>
+ <copy todir="${deploy.dir2}">
+ <fileset dir="${deploy.dir}">
+ <exclude name="**/*jca-config-example.ear"/>
+ <exclude name="**/*ra.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${deploy.dir2}/deploy/messaging.sar">
+ <fileset dir="server2">
+ <include name="jms-remote-ds.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${deploy.dir2}/deploy/jms-ra.rar/META-INF">
+ <fileset dir="server2">
+ <include name="ra.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${deploy.dir2}/deploy">
+ <fileset dir="${build.dir}">
+ <include name="**/*jca-config-example2.ear"/>
+ </fileset>
+ </copy>
+
+ <exec dir="${jboss.home}/bin" command="./run.sh -c jca-config-example-profile2 -Djboss.service.binding.set=ports-01"/>
<!-- copy 1st server resources configuration -->
- <copy file="./server-config/jms-remote-ds.xml" todir="${deploy.dir}" overwrite="yes"/>
- <copy file="./server-config/jbm-queues.xml" tofile="${deploy.dir}/messaging.sar/jbm-queues.xml" overwrite="yes"/>
- <copy file="./server-config/jbm-jms.xml" tofile="${deploy.dir}/messaging.sar/jbm-jms.xml" overwrite="yes"/>
+ <!--<copy file="./server/jms-remote-ds.xml" todir="${deploy.dir}" overwrite="yes"/>
+ <copy file="./server/jbm-queues.xml" tofile="${deploy.dir}/messaging.sar/jbm-queues.xml" overwrite="yes"/>
+ <copy file="./server/jbm-jms.xml" tofile="${deploy.dir}/messaging.sar/jbm-jms.xml" overwrite="yes"/>
- <!-- copy 2nd server resources configuration -->
- <copy file="./server-config/jbm-queues.xml" tofile="${deploy.dir2}/messaging.sar/jbm-queues.xml" overwrite="yes"/>
- <copy file="./server-config/jbm-jms.xml" tofile="${deploy.dir2}/messaging.sar/jbm-jms.xml" overwrite="yes"/>
+ --><!-- copy 2nd server resources configuration --><!--
+ <copy file="./server/jbm-queues.xml" tofile="${deploy.dir2}/messaging.sar/jbm-queues.xml" overwrite="yes"/>
+ <copy file="./server/jbm-jms.xml" tofile="${deploy.dir2}/messaging.sar/jbm-jms.xml" overwrite="yes"/>
<copy todir="${deploy.dir}/example-jbm-ra.rar.tmp" overwrite="yes">
<fileset dir="${deploy.dir}/jms-ra.rar" includes="**/*" excludes="META-INF/ra.xml"/>
</copy>
- <copy file="./server-config/alternate-ra.xml" tofile="${deploy.dir}/example-jbm-ra.rar.tmp/META-INF/ra.xml" overwrite="yes"/>
- <!-- We need the deployment atomic. We only rename the file after the ra.xml was copied -->
+ <copy file="./server/alternate-ra.xml" tofile="${deploy.dir}/example-jbm-ra.rar.tmp/META-INF/ra.xml" overwrite="yes"/>
+ --><!-- We need the deployment atomic. We only rename the file after the ra.xml was copied --><!--
<move file="${deploy.dir}/example-jbm-ra.rar.tmp" tofile="${deploy.dir}/example-jbm-ra.rar" overwrite="yes"/>
<sleep seconds="10"/>
<antcall target="deploy-ear">
<param name="deploy.dir" value="${deploy.dir}" />
- </antcall>
+ </antcall>-->
</target>
- <target name="undeploy">
- <property name="deploy.dir" value="${jboss.home}/server/default-with-jbm2/deploy/" />
+ <target name="undeploy2">
+ <property name="deploy.dir2" value="${jboss.home}/server/jca-config-example-profile2/" />
+ <delete dir="${deploy.dir2}"/>
+ <!--<property name="deploy.dir" value="${jboss.home}/server/default-with-jbm2/deploy/" />
<property name="deploy.dir2" value="${jboss.home}/server/default-with-jbm2_2/deploy/" />
<delete file="${deploy.dir}/mdb-example.ear" failonerror="false"/>
- <!-- delete 1st server resources configuration -->
+ --><!-- delete 1st server resources configuration --><!--
<delete file="${deploy.dir}/jms-remote-ds.xml" failonerror="false"/>
<delete file="${deploy.dir}/messaging.sar/jbm-queues.xml" failonerror="false"/>
<delete file="${deploy.dir}/messaging.sar/jbm-jms.xml" failonerror="false"/>
<delete dir="${deploy.dir}/example-jbm-ra.rar" failonerror="false"/>
- <!-- delete 2nd server resources configuration -->
+ --><!-- delete 2nd server resources configuration --><!--
<delete file="${deploy.dir2}/messaging.sar/jbm-queues.xml" failonerror="false"/>
- <delete file="${deploy.dir2}/messaging.sar/jbm-jms.xml" failonerror="false"/>
+ <delete file="${deploy.dir2}/messaging.sar/jbm-jms.xml" failonerror="false"/>-->
</target>
<target name="run">
Added: trunk/examples/javaee/jca-config/config/ant.properties
===================================================================
--- trunk/examples/javaee/jca-config/config/ant.properties (rev 0)
+++ trunk/examples/javaee/jca-config/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=jca-config
\ No newline at end of file
Modified: trunk/examples/javaee/jca-config/config/jndi.properties
===================================================================
--- trunk/examples/javaee/jca-config/config/jndi.properties 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/config/jndi.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,3 +1,3 @@
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
+java.naming.provider.url=jnp://localhost:1199
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Copied: trunk/examples/javaee/jca-config/server (from rev 6789, trunk/examples/javaee/jca-config/server-config)
Deleted: trunk/examples/javaee/jca-config/server/alternate-ra.xml
===================================================================
--- trunk/examples/javaee/jca-config/server-config/alternate-ra.xml 2009-05-14 11:07:24 UTC (rev 6789)
+++ trunk/examples/javaee/jca-config/server/alternate-ra.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- This file will be installed by the example mdb-remote/build.xml, deploy target.
- This is an example of how you could change the default configuration of a resource adapter
- -->
-
-<connector xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- version="1.5">
-
- <description>JBoss Messaging 2.0 Resource Adapter Alternate Configuration</description>
- <display-name>JBoss Messaging 2.0 Resource Adapter Alternate Configuration</display-name>
-
- <vendor-name>Red Hat Middleware LLC</vendor-name>
- <eis-type>JMS 1.1 Server</eis-type>
- <resourceadapter-version>1.0</resourceadapter-version>
-
- <license>
- <description>
- JBoss, Home of Professional Open Source.
- Copyright 2009, Red Hat Middleware LLC, and individual contributors
- as indicated by the @author tags. See the copyright.txt file in the
- distribution for a full listing of individual contributors.
-
- This is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of
- the License, or (at your option) any later version.
-
- This software is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this software; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- </description>
- <license-required>true</license-required>
- </license>
-
- <resourceadapter>
- <resourceadapter-class>org.jboss.messaging.ra.JBMResourceAdapter</resourceadapter-class>
- <config-property>
- <description>The transport type</description>
- <config-property-name>ConnectorClassName</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</config-property-value>
- </config-property>
- <config-property>
- <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
- <config-property-name>ConnectionParameters</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>jbm.remoting.netty.port=5545</config-property-value>
- </config-property>
- <config-property>
- <description>Use XA methods to obtain connections?</description>
- <config-property-name>UseXA</config-property-name>
- <config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>true</config-property-value>
- </config-property>
- <config-property>
- <description>The user name used to login to the JMS server</description>
- <config-property-name>UserName</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
- <config-property>
- <description>The password used to login to the JMS server</description>
- <config-property-name>Password</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value></config-property-value>
- </config-property>
-
- <outbound-resourceadapter>
- <connection-definition>
- <managedconnectionfactory-class>org.jboss.messaging.ra.JBMManagedConnectionFactory</managedconnectionfactory-class>
-
- <config-property>
- <description>The default session type</description>
- <config-property-name>SessionDefaultType</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
- <config-property-value>javax.jms.Queue</config-property-value>
- </config-property>
- <config-property>
- <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
- <config-property-name>UseTryLock</config-property-name>
- <config-property-type>java.lang.Integer</config-property-type>
- <config-property-value>0</config-property-value>
- </config-property>
-
- <connectionfactory-interface>org.jboss.messaging.ra.JBMConnectionFactory</connectionfactory-interface>
- <connectionfactory-impl-class>org.jboss.messaging.ra.JBMConnectionFactoryImpl</connectionfactory-impl-class>
- <connection-interface>javax.jms.Session</connection-interface>
- <connection-impl-class>org.jboss.messaging.ra.JBMSession</connection-impl-class>
- </connection-definition>
- <transaction-support>XATransaction</transaction-support>
- <authentication-mechanism>
- <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
- <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
- </authentication-mechanism>
- <reauthentication-support>false</reauthentication-support>
- </outbound-resourceadapter>
-
- <inbound-resourceadapter>
- <messageadapter>
- <messagelistener>
- <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
- <activationspec>
- <activationspec-class>org.jboss.messaging.ra.inflow.JBMActivationSpec</activationspec-class>
- <required-config-property>
- <config-property-name>destination</config-property-name>
- </required-config-property>
- </activationspec>
- </messagelistener>
- </messageadapter>
- </inbound-resourceadapter>
-
- </resourceadapter>
-</connector>
Added: trunk/examples/javaee/jca-config/server/jbm-configuration.xml
===================================================================
--- trunk/examples/javaee/jca-config/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/jca-config/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,40 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <!-- Connectors -->
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+
+ </connectors>
+
+ <!-- Acceptors -->
+ <acceptors>
+ <!-- In VM acceptor -->
+ <acceptor name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
+ </acceptor>
+
+ <!-- Netty TCP Acceptor -->
+ <acceptor name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.port}" type="Integer"/>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.queue.#">
+ <permission type="consume" roles="guest,publisher"/>
+ <permission type="send" roles="guest,publisher"/>
+ </security-setting>
+ </security-settings>
+
+
+</configuration>
Modified: trunk/examples/javaee/jca-config/server/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/jca-config/server-config/jbm-jms.xml 2009-05-14 11:07:24 UTC (rev 6789)
+++ trunk/examples/javaee/jca-config/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -2,7 +2,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
<connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
+ <connector-ref connector-name="netty"/>
<entries>
<entry name="ConnectionFactory"/>
<entry name="XAConnectionFactory"/>
Deleted: trunk/examples/javaee/jca-config/server/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/jca-config/server-config/jbm-queues.xml 2009-05-14 11:07:24 UTC (rev 6789)
+++ trunk/examples/javaee/jca-config/server/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,12 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.#">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
-</configuration>
Deleted: trunk/examples/javaee/jca-config/server/jms-remote-ds.xml
===================================================================
--- trunk/examples/javaee/jca-config/server-config/jms-remote-ds.xml 2009-05-14 11:07:24 UTC (rev 6789)
+++ trunk/examples/javaee/jca-config/server/jms-remote-ds.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-
-<!-- This file will be deployed by the target deploy on build.xml -->
-<connection-factories>
-
-
- <!--
- JMS XA Resource adapter, use this for outbound JMS connections.
- Inbound connections are defined at the @MDB activaction or at the resource-adapter properties.
- -->
- <tx-connection-factory>
- <jndi-name>RemoteJmsXA</jndi-name>
- <xa-transaction/>
- <rar-name>jms-ra.rar</rar-name>
- <connection-definition>org.jboss.messaging.ra.JBMConnectionFactory</connection-definition>
- <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
- <config-property name="ConnectorClassName" type="java.lang.String">org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</config-property>
- <config-property name="ConnectionParameters" type="java.lang.String">jbm.remoting.netty.port=5545</config-property>
- <max-pool-size>20</max-pool-size>
- </tx-connection-factory>
-
-
-</connection-factories>
Added: trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml
===================================================================
--- trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml (rev 0)
+++ trunk/examples/javaee/jca-config/server2/jms-remote-ds.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!-- This file will be deployed by the target deploy on build.xml -->
+<connection-factories>
+
+
+ <!--
+ JMS XA Resource adapter, use this for outbound JMS connections.
+ Inbound connections are defined at the @MDB activaction or at the resource-adapter properties.
+ -->
+ <tx-connection-factory>
+ <jndi-name>RemoteJmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.jboss.messaging.ra.JBMConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="ConnectorClassName" type="java.lang.String">org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</config-property>
+ <config-property name="ConnectionParameters" type="java.lang.String">jbm.remoting.netty.port=5445</config-property>
+ <max-pool-size>20</max-pool-size>
+ </tx-connection-factory>
+
+
+</connection-factories>
Added: trunk/examples/javaee/jca-config/server2/ra.xml
===================================================================
--- trunk/examples/javaee/jca-config/server2/ra.xml (rev 0)
+++ trunk/examples/javaee/jca-config/server2/ra.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- This file will be installed by the example mdb-remote/build.xml, deploy target.
+ This is an example of how you could change the default configuration of a resource adapter
+ -->
+
+<connector xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
+ version="1.5">
+
+ <description>JBoss Messaging 2.0 Resource Adapter Alternate Configuration</description>
+ <display-name>JBoss Messaging 2.0 Resource Adapter Alternate Configuration</display-name>
+
+ <vendor-name>Red Hat Middleware LLC</vendor-name>
+ <eis-type>JMS 1.1 Server</eis-type>
+ <resourceadapter-version>1.0</resourceadapter-version>
+
+ <license>
+ <description>
+ JBoss, Home of Professional Open Source.
+ Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags. See the copyright.txt file in the
+ distribution for a full listing of individual contributors.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ </description>
+ <license-required>true</license-required>
+ </license>
+
+ <resourceadapter>
+ <resourceadapter-class>org.jboss.messaging.ra.JBMResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+ <config-property-name>ConnectorClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>ConnectionParameters</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>jbm.remoting.netty.port=5445</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Use XA methods to obtain connections?</description>
+ <config-property-name>UseXA</config-property-name>
+ <config-property-type>java.lang.Boolean</config-property-type>
+ <config-property-value>true</config-property-value>
+ </config-property>
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.jboss.messaging.ra.JBMManagedConnectionFactory</managedconnectionfactory-class>
+
+ <config-property>
+ <description>The default session type</description>
+ <config-property-name>SessionDefaultType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>javax.jms.Queue</config-property-value>
+ </config-property>
+ <config-property>
+ <description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
+ <config-property-name>UseTryLock</config-property-name>
+ <config-property-type>java.lang.Integer</config-property-type>
+ <config-property-value>0</config-property-value>
+ </config-property>
+
+ <connectionfactory-interface>org.jboss.messaging.ra.JBMConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.jboss.messaging.ra.JBMConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.jboss.messaging.ra.JBMSession</connection-impl-class>
+ </connection-definition>
+ <transaction-support>XATransaction</transaction-support>
+ <authentication-mechanism>
+ <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+ <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ </outbound-resourceadapter>
+
+ <inbound-resourceadapter>
+ <messageadapter>
+ <messagelistener>
+ <messagelistener-type>javax.jms.MessageListener</messagelistener-type>
+ <activationspec>
+ <activationspec-class>org.jboss.messaging.ra.inflow.JBMActivationSpec</activationspec-class>
+ <required-config-property>
+ <config-property-name>destination</config-property-name>
+ </required-config-property>
+ </activationspec>
+ </messagelistener>
+ </messageadapter>
+ </inbound-resourceadapter>
+
+ </resourceadapter>
+</connector>
Modified: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/MDBRemoteClientExample.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/MDBRemoteClientExample.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/MDBRemoteClientExample.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -21,22 +21,11 @@
*/
package org.jboss.javaee.example;
-import static org.jboss.messaging.integration.transports.netty.TransportConstants.PORT_PROP_NAME;
+import org.jboss.javaee.example.server2.StatelessSenderService;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jms.*;
-import javax.jms.ConnectionFactory;
-import javax.jms.Queue;
+import javax.jms.Connection;
import javax.naming.InitialContext;
-import org.jboss.javaee.example.server.StatelessSenderService;
-import org.jboss.messaging.core.config.TransportConfiguration;
-import org.jboss.messaging.integration.transports.netty.NettyConnectorFactory;
-import org.jboss.messaging.jms.JBossQueue;
-import org.jboss.messaging.jms.client.JBossConnectionFactory;
-
/**
*
* MDB Remote & JCA Configuration Example.
@@ -55,37 +44,13 @@
initialContext = new InitialContext();
//Step 2. Getting a reference to the Stateless Bean
- StatelessSenderService sender = (StatelessSenderService)initialContext.lookup("mdb-example/StatelessSender/remote");
+ StatelessSenderService sender = (StatelessSenderService)initialContext.lookup("jca-config-example2/StatelessSender/remote");
//Step 3. Calling a Stateless Session Bean. You will have more steps on the SessionBean
sender.sendHello("Hello there MDB!");
System.out.println("Step 3: Invoking the Stateless Bean");
-
- Map<String, Object> connectionParams = new HashMap<String, Object>();
-
- connectionParams.put(PORT_PROP_NAME, 5545);
-
- TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(),
- connectionParams);
-
- // Step 4. Sending a message to another
- ConnectionFactory cf = new JBossConnectionFactory(transportConfiguration);
- Queue queue = new JBossQueue("B");
- Connection conn = cf.createConnection("guest", "guest");
- Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sess.createProducer(queue);
- prod.send(sess.createTextMessage("Hello there MDB talking to another RAR!"));
- conn.close();
-
-
- System.out.println("Step 4: Sent a message to QueueB.");
-
-
- System.out.println("Follow other steps on the application server's consoles now.");
-
-
initialContext.close();
}
finally
Modified: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueA.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueA.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueA.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -38,9 +38,7 @@
{
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/A"),
- @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
- @ActivationConfigProperty(propertyName = "ConnectorClassName", propertyValue = "org.jboss.messaging.integration.transports.netty.NettyConnectorFactory"),
- @ActivationConfigProperty(propertyName = "ConnectionParameters", propertyValue = "jbm.remoting.netty.port=5545") // Port on the second server
+ @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
})
public class MDBQueueA implements MessageListener
{
@@ -52,7 +50,7 @@
String text = tm.getText();
- System.out.println("Step 9: (MDBQueueA.java) Message received using the default adapter. Message = \"" + text + "\"" );
+ System.out.println("Step 10: (MDBQueueA.java) Message received using the default adapter. Message = \"" + text + "\"" );
}
catch (Exception e)
Deleted: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueB.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueB.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/MDBQueueB.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.javaee.example.server;
-
-import javax.ejb.ActivationConfigProperty;
-import javax.ejb.MessageDriven;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.TextMessage;
-
-import org.jboss.ejb3.annotation.ResourceAdapter;
-
-
-/**
- * MDB that is connected to the remote queue, using an alternate resource-adapter
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- */
-
-//Step 10. The message is received on the MDB, using a remote queue and a different ResourceAdapter
- at MessageDriven(name = "MDB_QueueB",
- activationConfig =
- {
- @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
- @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/B"),
- @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
- })
- @ResourceAdapter("example-jbm-ra.rar")
-
-public class MDBQueueB implements MessageListener
-{
- public void onMessage(Message message)
- {
- try
- {
- TextMessage tm = (TextMessage)message;
-
- String text = tm.getText();
-
-
- System.out.println("Step 10: (MDBQueueB.java) Message received using the default adapter. Message = \"" + text + "\"" );
-
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-}
Deleted: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSender.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSender.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSender.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-
-package org.jboss.javaee.example.server;
-
-import javax.annotation.Resource;
-import javax.ejb.Remote;
-import javax.ejb.Stateless;
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-import org.jboss.messaging.jms.JBossQueue;
-
-/**
- * A Stateless Bean that will connect to a remote JBM.
- *
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- *
- *
- */
- at Remote(StatelessSenderService.class)
- at Stateless
-public class StatelessSender implements StatelessSenderService
-{
-
- /**
- * Resource to be deployed by jms-remote-ds.xml
- * */
- @Resource(mappedName="java:RemoteJmsXA")
- private ConnectionFactory connectionFactory;
-
-
- /* (non-Javadoc)
- * @see org.jboss.javaee.example.server.StatelessSenderService#sendHello(java.lang.String)
- */
- public void sendHello(String message) throws Exception
- {
- // Step 5. Define the destination that will receive the message (instead of using JNDI to the remote server)
- JBossQueue destQueue = new JBossQueue("A");
-
- // Step 6. Create a connection to a remote server using a connection-factory (look at the deployed file jms-remote-ds.xml)
- Connection conn = connectionFactory.createConnection("guest", "guest");
-
- // Step 7. Send a message to a QueueA on the remote server, which will be received by MDBQueueA
- Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer prod = sess.createProducer(destQueue);
- prod.send(sess.createTextMessage(message));
-
- System.out.println("Step 7 (StatelessSender.java): Sent message \"" + message + "\" to QueueA");
-
- // Step 8. Close the connection. (Since this is a JCA connection, this will just place the connection back to a connection pool)
- conn.close();
- System.out.println("Step 8 (StatelessSender.java): Closed Connection (sending it back to pool)");
-
- }
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-
-}
Deleted: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSenderService.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSenderService.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSenderService.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-
-package org.jboss.javaee.example.server;
-
-/**
- * A StatelessSenderService
- *
- * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
- *
- *
- */
-public interface StatelessSenderService
-{
-
- public void sendHello(String message) throws Exception;
-
-}
Added: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/MDBQueueB.java
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/MDBQueueB.java (rev 0)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/MDBQueueB.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javaee.example.server2;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.TextMessage;
+
+/**
+ * MDB that is connected to the remote queue.
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ */
+
+//Step 9. The message is received on the MDB, using a remote queue.
+ at MessageDriven(name = "MDB_QueueA",
+ activationConfig =
+ {
+ @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
+ @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/B"),
+ @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
+ })
+public class MDBQueueB implements MessageListener
+{
+ public void onMessage(Message message)
+ {
+ try
+ {
+ TextMessage tm = (TextMessage)message;
+
+ String text = tm.getText();
+
+ System.out.println("Step 11: (MDBQueueB.java) Message received using the remote adapter. Message = \"" + text + "\"" );
+
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+}
Copied: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSender.java (from rev 6789, trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSender.java)
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSender.java (rev 0)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSender.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.javaee.example.server2;
+
+import org.jboss.messaging.jms.JBossQueue;
+
+import javax.annotation.Resource;
+import javax.ejb.Remote;
+import javax.ejb.Stateless;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
+/**
+ * A Stateless Bean that will connect to a remote JBM.
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+ at Remote(StatelessSenderService.class)
+ at Stateless
+public class StatelessSender implements StatelessSenderService
+{
+
+ /**
+ * Resource to be deployed by jms-remote-ds.xml
+ * */
+ @Resource(mappedName="java:RemoteJmsXA")
+ private ConnectionFactory connectionFactory;
+
+
+ /* (non-Javadoc)
+ * @see org.jboss.javaee.example.server.StatelessSenderService#sendHello(java.lang.String)
+ */
+ public void sendHello(String message) throws Exception
+ {
+ // Step 5. Define the destination that will receive the message (instead of using JNDI to the remote server)
+ JBossQueue destQueueA = new JBossQueue("A");
+
+ JBossQueue destQueueB = new JBossQueue("B");
+
+ // Step 6. Create a connection to a remote server using a connection-factory (look at the deployed file jms-remote-ds.xml)
+ Connection conn = connectionFactory.createConnection("guest", "guest");
+
+ // Step 7. Send a message to a QueueA on the remote server, which will be received by MDBQueueA
+ Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer prodA = sess.createProducer(destQueueA);
+ prodA.send(sess.createTextMessage(message));
+
+ System.out.println("Step 7 (StatelessSender.java): Sent message \"" + message + "\" to QueueA");
+
+ MessageProducer prodB = sess.createProducer(destQueueB);
+ prodB.send(sess.createTextMessage(message));
+
+ System.out.println("Step 8 (StatelessSender.java): Sent message \"" + message + "\" to QueueB");
+
+ // Step 8. Close the connection. (Since this is a JCA connection, this will just place the connection back to a connection pool)
+ conn.close();
+ System.out.println("Step 9 (StatelessSender.java): Closed Connection (sending it back to pool)");
+
+ }
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
Copied: trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSenderService.java (from rev 6789, trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server/StatelessSenderService.java)
===================================================================
--- trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSenderService.java (rev 0)
+++ trunk/examples/javaee/jca-config/src/org/jboss/javaee/example/server2/StatelessSenderService.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005-2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.javaee.example.server2;
+
+/**
+ * A StatelessSenderService
+ *
+ * @author <a href="mailto:clebert.suconic at jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+public interface StatelessSenderService
+{
+
+ public void sendHello(String message) throws Exception;
+
+}
Modified: trunk/examples/javaee/jms-bridge/build.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/build.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jms-bridge/build.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -37,7 +37,7 @@
<target name="deploy-misc">
<echo>Deploy JMS Bridge</echo>
- <copy file="${example.config.dir}/jms-bridge-jboss-beans.xml" todir="${deploy.dir}" />
+ <copy file="server/jms-bridge-jboss-beans.xml" todir="${deploy.dir}" />
</target>
<target name="undeploy-misc">
Added: trunk/examples/javaee/jms-bridge/config/ant.properties
===================================================================
--- trunk/examples/javaee/jms-bridge/config/ant.properties (rev 0)
+++ trunk/examples/javaee/jms-bridge/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=jms-bridge
\ No newline at end of file
Deleted: trunk/examples/javaee/jms-bridge/config/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/config/jbm-jms.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jms-bridge/config/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,19 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
- <connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="source">
- <entry name="/queue/source"/>
- </queue>
- <queue name="target">
- <entry name="/queue/target"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted: trunk/examples/javaee/jms-bridge/config/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/config/jbm-queues.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jms-bridge/config/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,12 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.#">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
-</configuration>
Deleted: trunk/examples/javaee/jms-bridge/config/jms-bridge-jboss-beans.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/config/jms-bridge-jboss-beans.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/jms-bridge/config/jms-bridge-jboss-beans.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <bean name="JMSBridge" class="org.jboss.messaging.jms.bridge.impl.JMSBridgeImpl">
- <!-- JBoss Messaging must be started before the bridge -->
- <depends>MessagingServer</depends>
- <constructor>
- <!-- Source ConnectionFactory Factory -->
- <parameter>
- <inject bean="SourceCFF"/>
- </parameter>
- <!-- Target ConnectionFactory Factory -->
- <parameter>
- <inject bean="TargetCFF"/>
- </parameter>
- <!-- Source DestinationFactory -->
- <parameter>
- <inject bean="SourceDestinationFactory"/>
- </parameter>
- <!-- Target DestinationFactory -->
- <parameter>
- <inject bean="TargetDestinationFactory"/>
- </parameter>
- <!-- Source username (no username here) -->
- <parameter><null /></parameter>
- <!-- Source password (no password here)-->
- <parameter><null /></parameter>
- <!-- Target username (no username here)-->
- <parameter><null /></parameter>
- <!-- Target password (no password here)-->
- <parameter><null /></parameter>
- <!-- Selector -->
- <parameter><null /></parameter>
- <!-- Interval to retry in case of failure (in ms) -->
- <parameter>5000</parameter>
- <!-- Maximum number of retries to connect to the source and target -->
- <parameter>10</parameter>
- <!-- Quality of service -->
- <parameter>ONCE_AND_ONLY_ONCE</parameter>
- <!-- Maximum batch size -->
- <parameter>1</parameter>
- <!-- Maximum batch time (-1 means infinite) -->
- <parameter>-1</parameter>
- <!-- Subscription name (no subscription name here)-->
- <parameter><null /></parameter>
- <!-- client ID (no client ID here)-->
- <parameter><null /></parameter>
- <!-- concatenate JMS messageID to the target's message header -->
- <parameter>true</parameter>
- </constructor>
- <property name="transactionManager">
- <inject bean="RealTransactionManager"/>
- </property>
- </bean>
-
- <!-- SourceCFF describes the ConnectionFactory used to connect to the source destination -->
- <bean name="SourceCFF" class="org.jboss.messaging.jms.bridge.impl.JNDIConnectionFactoryFactory">
- <constructor>
- <parameter>
- <inject bean="JNDI" />
- </parameter>
- <parameter>/ConnectionFactory</parameter>
- </constructor>
- </bean>
-
- <!-- TargetCFF describes the ConnectionFactory used to connect to the target destination -->
- <bean name="TargetCFF" class="org.jboss.messaging.jms.bridge.impl.JNDIConnectionFactoryFactory">
- <constructor>
- <parameter>
- <inject bean="JNDI" />
- </parameter>
- <parameter>/ConnectionFactory</parameter>
- </constructor>
- </bean>
-
- <!-- SourceDestinationFactory describes the Destination used as the source -->
- <bean name="SourceDestinationFactory" class="org.jboss.messaging.jms.bridge.impl.JNDIDestinationFactory">
- <constructor>
- <parameter>
- <inject bean="JNDI" />
- </parameter>
- <parameter>/queue/source</parameter>
- </constructor>
- </bean>
-
- <!-- TargetDestinationFactory describes the Destination used as the target -->
- <bean name="TargetDestinationFactory" class="org.jboss.messaging.jms.bridge.impl.JNDIDestinationFactory">
- <constructor>
- <parameter>
- <inject bean="JNDI" />
- </parameter>
- <parameter>/queue/target</parameter>
- </constructor>
- </bean>
-
- <!-- JNDI is a Hashtable containing the JNDI properties required -->
- <!-- to connect to the sources and targets JMS resrouces -->
- <bean name="JNDI" class="java.util.Hashtable">
- <constructor class="java.util.Map">
- <map class="java.util.Hashtable" keyClass="java.lang.String"
- valueClass="java.lang.String">
- <entry>
- <key>java.naming.factory.initial</key>
- <value>org.jnp.interfaces.NamingContextFactory</value>
- </entry>
- <entry>
- <key>java.naming.provider.url</key>
- <value>jnp://localhost:1099</value>
- </entry>
- <entry>
- <key>java.naming.factory.url.pkgs</key>
- <value>org.jboss.naming:org.jnp.interfaces"</value>
- </entry>
- </map>
- </constructor>
- </bean>
-
-</deployment>
\ No newline at end of file
Added: trunk/examples/javaee/jms-bridge/server/jbm-configuration.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/jms-bridge/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,40 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <!-- Connectors -->
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+
+ </connectors>
+
+ <!-- Acceptors -->
+ <acceptors>
+ <!-- In VM acceptor -->
+ <acceptor name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
+ </acceptor>
+
+ <!-- Netty TCP Acceptor -->
+ <acceptor name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.queue.#">
+ <permission type="consume" roles="guest,publisher"/>
+ <permission type="send" roles="guest,publisher"/>
+ </security-setting>
+ </security-settings>
+
+
+
+</configuration>
Copied: trunk/examples/javaee/jms-bridge/server/jbm-jms.xml (from rev 6789, trunk/examples/javaee/jms-bridge/config/jbm-jms.xml)
===================================================================
--- trunk/examples/javaee/jms-bridge/server/jbm-jms.xml (rev 0)
+++ trunk/examples/javaee/jms-bridge/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,19 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty"/>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ <entry name="XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="source">
+ <entry name="/queue/source"/>
+ </queue>
+ <queue name="target">
+ <entry name="/queue/target"/>
+ </queue>
+</configuration>
\ No newline at end of file
Added: trunk/examples/javaee/jms-bridge/server/jbm-users.xml
===================================================================
--- trunk/examples/javaee/jms-bridge/server/jbm-users.xml (rev 0)
+++ trunk/examples/javaee/jms-bridge/server/jbm-users.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Copied: trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml (from rev 6789, trunk/examples/javaee/jms-bridge/config/jms-bridge-jboss-beans.xml)
===================================================================
--- trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml (rev 0)
+++ trunk/examples/javaee/jms-bridge/server/jms-bridge-jboss-beans.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="JMSBridge" class="org.jboss.messaging.jms.bridge.impl.JMSBridgeImpl">
+ <!-- JBoss Messaging must be started before the bridge -->
+ <depends>MessagingServer</depends>
+ <constructor>
+ <!-- Source ConnectionFactory Factory -->
+ <parameter>
+ <inject bean="SourceCFF"/>
+ </parameter>
+ <!-- Target ConnectionFactory Factory -->
+ <parameter>
+ <inject bean="TargetCFF"/>
+ </parameter>
+ <!-- Source DestinationFactory -->
+ <parameter>
+ <inject bean="SourceDestinationFactory"/>
+ </parameter>
+ <!-- Target DestinationFactory -->
+ <parameter>
+ <inject bean="TargetDestinationFactory"/>
+ </parameter>
+ <!-- Source username (no username here) -->
+ <parameter><null /></parameter>
+ <!-- Source password (no password here)-->
+ <parameter><null /></parameter>
+ <!-- Target username (no username here)-->
+ <parameter><null /></parameter>
+ <!-- Target password (no password here)-->
+ <parameter><null /></parameter>
+ <!-- Selector -->
+ <parameter><null /></parameter>
+ <!-- Interval to retry in case of failure (in ms) -->
+ <parameter>5000</parameter>
+ <!-- Maximum number of retries to connect to the source and target -->
+ <parameter>10</parameter>
+ <!-- Quality of service -->
+ <parameter>ONCE_AND_ONLY_ONCE</parameter>
+ <!-- Maximum batch size -->
+ <parameter>1</parameter>
+ <!-- Maximum batch time (-1 means infinite) -->
+ <parameter>-1</parameter>
+ <!-- Subscription name (no subscription name here)-->
+ <parameter><null /></parameter>
+ <!-- client ID (no client ID here)-->
+ <parameter><null /></parameter>
+ <!-- concatenate JMS messageID to the target's message header -->
+ <parameter>true</parameter>
+ </constructor>
+ <property name="transactionManager">
+ <inject bean="RealTransactionManager"/>
+ </property>
+ </bean>
+
+ <!-- SourceCFF describes the ConnectionFactory used to connect to the source destination -->
+ <bean name="SourceCFF" class="org.jboss.messaging.jms.bridge.impl.JNDIConnectionFactoryFactory">
+ <constructor>
+ <parameter>
+ <inject bean="JNDI" />
+ </parameter>
+ <parameter>/ConnectionFactory</parameter>
+ </constructor>
+ </bean>
+
+ <!-- TargetCFF describes the ConnectionFactory used to connect to the target destination -->
+ <bean name="TargetCFF" class="org.jboss.messaging.jms.bridge.impl.JNDIConnectionFactoryFactory">
+ <constructor>
+ <parameter>
+ <inject bean="JNDI" />
+ </parameter>
+ <parameter>/ConnectionFactory</parameter>
+ </constructor>
+ </bean>
+
+ <!-- SourceDestinationFactory describes the Destination used as the source -->
+ <bean name="SourceDestinationFactory" class="org.jboss.messaging.jms.bridge.impl.JNDIDestinationFactory">
+ <constructor>
+ <parameter>
+ <inject bean="JNDI" />
+ </parameter>
+ <parameter>/queue/source</parameter>
+ </constructor>
+ </bean>
+
+ <!-- TargetDestinationFactory describes the Destination used as the target -->
+ <bean name="TargetDestinationFactory" class="org.jboss.messaging.jms.bridge.impl.JNDIDestinationFactory">
+ <constructor>
+ <parameter>
+ <inject bean="JNDI" />
+ </parameter>
+ <parameter>/queue/target</parameter>
+ </constructor>
+ </bean>
+
+ <!-- JNDI is a Hashtable containing the JNDI properties required -->
+ <!-- to connect to the sources and targets JMS resrouces -->
+ <bean name="JNDI" class="java.util.Hashtable">
+ <constructor class="java.util.Map">
+ <map class="java.util.Hashtable" keyClass="java.lang.String"
+ valueClass="java.lang.String">
+ <entry>
+ <key>java.naming.factory.initial</key>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </entry>
+ <entry>
+ <key>java.naming.provider.url</key>
+ <value>jnp://localhost:1099</value>
+ </entry>
+ <entry>
+ <key>java.naming.factory.url.pkgs</key>
+ <value>org.jboss.naming:org.jnp.interfaces"</value>
+ </entry>
+ </map>
+ </constructor>
+ </bean>
+
+</deployment>
\ No newline at end of file
Modified: trunk/examples/javaee/mdb/build.xml
===================================================================
--- trunk/examples/javaee/mdb/build.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/mdb/build.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -28,7 +28,7 @@
<project default="run" name="JBoss Messaging Java EE MDB Example">
<import file="../common/build.xml"/>
-
+
<target name="run">
<antcall target="runExample">
<param name="example.classname" value="org.jboss.javaee.example.MDBClientExample"/>
Added: trunk/examples/javaee/mdb/config/ant.properties
===================================================================
--- trunk/examples/javaee/mdb/config/ant.properties (rev 0)
+++ trunk/examples/javaee/mdb/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=mdb
\ No newline at end of file
Deleted: trunk/examples/javaee/mdb/config/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/mdb/config/jbm-jms.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/mdb/config/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,16 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
- <connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="testQueue">
- <entry name="/queue/testQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted: trunk/examples/javaee/mdb/config/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/mdb/config/jbm-queues.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/mdb/config/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,26 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.testQueue">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <clustered>false</clustered>
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>-1</max-size-bytes>
- <page-size-bytes>10485760</page-size-bytes>
- <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-
-</configuration>
Copied: trunk/examples/javaee/mdb/server/jbm-configuration.xml (from rev 6789, trunk/src/config/stand-alone/non-clustered/jbm-configuration.xml)
===================================================================
--- trunk/examples/javaee/mdb/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/mdb/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,56 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <!-- Connectors -->
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+
+ </connectors>
+
+ <!-- Acceptors -->
+ <acceptors>
+ <!-- In VM acceptor -->
+ <acceptor name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
+ </acceptor>
+
+ <!-- Netty TCP Acceptor -->
+ <acceptor name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <param key="jbm.remoting.netty.port" value="${jbm.remoting.netty.port}" type="Integer"/>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createTempQueue" roles="guest"/>
+ <permission type="deleteTempQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <clustered>false</clustered>
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>-1</max-size-bytes>
+ <page-size-bytes>10485760</page-size-bytes>
+ <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ </address-setting>
+ </address-settings>
+
+
+</configuration>
Copied: trunk/examples/javaee/mdb/server/jbm-jms.xml (from rev 6789, trunk/examples/javaee/mdb/config/jbm-jms.xml)
===================================================================
--- trunk/examples/javaee/mdb/server/jbm-jms.xml (rev 0)
+++ trunk/examples/javaee/mdb/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,16 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty"/>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ <entry name="XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="testQueue">
+ <entry name="/queue/testQueue"/>
+ </queue>
+</configuration>
\ No newline at end of file
Copied: trunk/examples/javaee/mdb/server/jbm-users.xml (from rev 6789, trunk/src/config/stand-alone/non-clustered/jbm-users.xml)
===================================================================
--- trunk/examples/javaee/mdb/server/jbm-users.xml (rev 0)
+++ trunk/examples/javaee/mdb/server/jbm-users.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Modified: trunk/examples/javaee/servlet-transport/build.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/build.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/servlet-transport/build.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -29,19 +29,6 @@
<import file="../common/build.xml"/>
- <target name="deploy-misc">
- <echo>Deploy Servlet</echo>
- <copy todir="${deploy.dir}/jms-servlet.war">
- <fileset dir="${example.config.dir}/jms-servlet.war"/>
- </copy>
- <sleep seconds="5"/>
- </target>
-
- <target name="undeploy-misc">
- <echo>Undeploy Servelt</echo>
- <delete dir="${deploy.dir}/jms-servlet.war" />
- </target>
-
<target name="run">
<antcall target="runExample">
<param name="example.classname" value="org.jboss.javaee.example.ServletTransportExample"/>
Added: trunk/examples/javaee/servlet-transport/config/META-INF/application.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/config/META-INF/application.xml (rev 0)
+++ trunk/examples/javaee/servlet-transport/config/META-INF/application.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,11 @@
+<application>
+ <display-name>My Application</display-name>
+
+ <module>
+ <web>
+ <web-uri>servlet-transport-example.war</web-uri>
+ <context-root>/messaging</context-root>
+ </web>
+ </module>
+
+</application>
Copied: trunk/examples/javaee/servlet-transport/config/WEB-INF/web.xml (from rev 6789, trunk/examples/javaee/servlet-transport/config/jms-servlet.war/WEB-INF/web.xml)
===================================================================
--- trunk/examples/javaee/servlet-transport/config/WEB-INF/web.xml (rev 0)
+++ trunk/examples/javaee/servlet-transport/config/WEB-INF/web.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+ <context-param>
+ <param-name>serverChannelName</param-name>
+ <param-value>org.jboss.jbm</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>streaming</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>reconnectTimeout</param-name>
+ <param-value>3000</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingSessionListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.jboss.netty.channel.socket.http.HttpTunnelingContextListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>NettyServlet</servlet-name>
+ <servlet-class>org.jboss.netty.channel.socket.http.HttpTunnelingServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>NettyServlet</servlet-name>
+ <url-pattern>/JBMServlet</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: trunk/examples/javaee/servlet-transport/config/ant.properties
===================================================================
--- trunk/examples/javaee/servlet-transport/config/ant.properties (rev 0)
+++ trunk/examples/javaee/servlet-transport/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=servlet-transport
\ No newline at end of file
Deleted: trunk/examples/javaee/servlet-transport/config/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/config/jbm-jms.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/servlet-transport/config/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,15 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
- <connection-factory name="TestServletConnectionFactory">
- <connector-ref connector-name="netty-servlet"/>
- <entries>
- <entry name="/TestServletConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="testQueue">
- <entry name="/queue/testQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted: trunk/examples/javaee/servlet-transport/config/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/config/jbm-queues.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/servlet-transport/config/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,26 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.testQueue">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <clustered>false</clustered>
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>-1</max-size-bytes>
- <page-size-bytes>10485760</page-size-bytes>
- <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-
-</configuration>
Added: trunk/examples/javaee/servlet-transport/server/jbm-configuration.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/servlet-transport/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,56 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <connectors>
+
+ <connector name="netty-servlet">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ <param key="jbm.remoting.netty.host" value="localhost" type="String"/>
+ <param key="jbm.remoting.netty.port" value="8080" type="Integer"/>
+ <param key="jbm.remoting.netty.useservlet" value="true" type="Boolean"/>
+ <param key="jbm.remoting.netty.servletpath" value="/messaging/JBMServlet" type="String"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+
+ <acceptor name="netty-servlet">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <param key="jbm.remoting.netty.useinvm" value="true" type="Boolean"/>
+ <param key="jbm.remoting.netty.host" value="org.jboss.jbm" type="String"/>
+ </acceptor>
+
+ <acceptor name="netty-invm">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ <param key="jbm.remoting.netty.useinvm" value="true" type="Boolean"/>
+ <param key="jbm.remoting.netty.host" value="org.jboss.jbm" type="String"/>
+ </acceptor>
+
+ </acceptors>
+
+
+ <security-settings>
+ <security-setting match="jms.queue.testQueue">
+ <permission type="consume" roles="guest,publisher"/>
+ <permission type="send" roles="guest,publisher"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <clustered>false</clustered>
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>-1</max-size-bytes>
+ <page-size-bytes>10485760</page-size-bytes>
+ <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ </address-setting>
+ </address-settings>
+
+
+</configuration>
Copied: trunk/examples/javaee/servlet-transport/server/jbm-jms.xml (from rev 6789, trunk/examples/javaee/servlet-transport/config/jbm-jms.xml)
===================================================================
--- trunk/examples/javaee/servlet-transport/server/jbm-jms.xml (rev 0)
+++ trunk/examples/javaee/servlet-transport/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,16 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+
+ <connection-factory name="ServletConnectionFactory">
+ <connector-ref connector-name="netty-servlet"/>
+ <entries>
+ <entry name="/ServletConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+
+ <queue name="testQueue">
+ <entry name="/queue/testQueue"/>
+ </queue>
+</configuration>
\ No newline at end of file
Added: trunk/examples/javaee/servlet-transport/server/jbm-users.xml
===================================================================
--- trunk/examples/javaee/servlet-transport/server/jbm-users.xml (rev 0)
+++ trunk/examples/javaee/servlet-transport/server/jbm-users.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Modified: trunk/examples/javaee/servlet-transport/src/org/jboss/javaee/example/ServletTransportExample.java
===================================================================
--- trunk/examples/javaee/servlet-transport/src/org/jboss/javaee/example/ServletTransportExample.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/servlet-transport/src/org/jboss/javaee/example/ServletTransportExample.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -50,7 +50,7 @@
Queue queue = (Queue) initialContext.lookup("/queue/testQueue");
//Step 3. Perform a lookup on the Connection Factory
- ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/TestServletConnectionFactory");
+ ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ServletConnectionFactory");
//Step 4.Create a JMS Connection
connection = cf.createConnection();
Added: trunk/examples/javaee/xarecovery/config/ant.properties
===================================================================
--- trunk/examples/javaee/xarecovery/config/ant.properties (rev 0)
+++ trunk/examples/javaee/xarecovery/config/ant.properties 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1 @@
+example.name=xarecovery
\ No newline at end of file
Deleted: trunk/examples/javaee/xarecovery/config/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/xarecovery/config/jbm-jms.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/xarecovery/config/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,16 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
-
- <connection-factory name="ConnectionFactory">
- <connector-ref connector-name="netty-connector"/>
- <entries>
- <entry name="ConnectionFactory"/>
- <entry name="XAConnectionFactory"/>
- </entries>
- </connection-factory>
-
- <queue name="testQueue">
- <entry name="/queue/testQueue"/>
- </queue>
-</configuration>
\ No newline at end of file
Deleted: trunk/examples/javaee/xarecovery/config/jbm-queues.xml
===================================================================
--- trunk/examples/javaee/xarecovery/config/jbm-queues.xml 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/xarecovery/config/jbm-queues.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -1,26 +0,0 @@
-<configuration xmlns="urn:jboss:messaging"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:messaging ../../../../src/schemas/jbm-configuration.xsd ">
-
- <security-settings>
- <security-setting match="jms.queue.testQueue">
- <permission type="consume" roles="guest,publisher"/>
- <permission type="send" roles="guest,publisher"/>
- </security-setting>
- </security-settings>
-
- <address-settings>
- <!--default for catch all-->
- <address-setting match="#">
- <clustered>false</clustered>
- <dead-letter-address>jms.queue.DLQ</dead-letter-address>
- <expiry-address>jms.queue.ExpiryQueue</expiry-address>
- <redelivery-delay>0</redelivery-delay>
- <max-size-bytes>-1</max-size-bytes>
- <page-size-bytes>10485760</page-size-bytes>
- <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
- <message-counter-history-day-limit>10</message-counter-history-day-limit>
- </address-setting>
- </address-settings>
-
-</configuration>
Added: trunk/examples/javaee/xarecovery/server/jbm-configuration.xml
===================================================================
--- trunk/examples/javaee/xarecovery/server/jbm-configuration.xml (rev 0)
+++ trunk/examples/javaee/xarecovery/server/jbm-configuration.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,53 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-configuration.xsd">
+
+ <!-- Connectors -->
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyConnectorFactory</factory-class>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ </connector>
+
+ </connectors>
+
+ <!-- Acceptors -->
+ <acceptors>
+ <!-- In VM acceptor -->
+ <acceptor name="in-vm">
+ <factory-class>org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="jbm.remoting.invm.serverid" value="0" type="Integer"/>
+ </acceptor>
+
+ <!-- Netty TCP Acceptor -->
+ <acceptor name="netty">
+ <factory-class>org.jboss.messaging.integration.transports.netty.NettyAcceptorFactory</factory-class>
+ </acceptor>
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="jms.queue.testQueue">
+ <permission type="consume" roles="guest,publisher"/>
+ <permission type="send" roles="guest,publisher"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <clustered>false</clustered>
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>-1</max-size-bytes>
+ <page-size-bytes>10485760</page-size-bytes>
+ <distribution-policy-class>org.jboss.messaging.core.server.impl.RoundRobinDistributor</distribution-policy-class>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ </address-setting>
+ </address-settings>
+
+
+</configuration>
Copied: trunk/examples/javaee/xarecovery/server/jbm-jms.xml (from rev 6789, trunk/examples/javaee/xarecovery/config/jbm-jms.xml)
===================================================================
--- trunk/examples/javaee/xarecovery/server/jbm-jms.xml (rev 0)
+++ trunk/examples/javaee/xarecovery/server/jbm-jms.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,17 @@
+<configuration xmlns="urn:jboss:messaging"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-jms.xsd">
+
+ <connection-factory name="ConnectionFactory">
+ <connector-ref connector-name="netty"/>
+ <entries>
+ <entry name="ConnectionFactory"/>
+ <entry name="XAConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="testQueue">
+ <entry name="/queue/testQueue"/>
+ </queue>
+</configuration>
\ No newline at end of file
Added: trunk/examples/javaee/xarecovery/server/jbm-users.xml
===================================================================
--- trunk/examples/javaee/xarecovery/server/jbm-users.xml (rev 0)
+++ trunk/examples/javaee/xarecovery/server/jbm-users.xml 2009-05-15 11:05:43 UTC (rev 6802)
@@ -0,0 +1,7 @@
+<configuration xmlns="urn:jboss:messaging" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:messaging /schema/jbm-users.xsd">
+ <!-- the default user. this is used where username is null-->
+ <defaultuser name="guest" password="guest">
+ <role name="guest"/>
+ </defaultuser>
+</configuration>
\ No newline at end of file
Modified: trunk/examples/javaee/xarecovery/src/org/jboss/javaee/example/XARecoverySenderExample.java
===================================================================
--- trunk/examples/javaee/xarecovery/src/org/jboss/javaee/example/XARecoverySenderExample.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/examples/javaee/xarecovery/src/org/jboss/javaee/example/XARecoverySenderExample.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -21,10 +21,10 @@
*/
package org.jboss.javaee.example;
+import org.jboss.javaee.example.server.XARecoveryExampleService;
+
import javax.naming.InitialContext;
-import org.jboss.javaee.example.server.XARecoveryExampleService;
-
/**
* An example which invokes an EJB. The EJB will "pause" the server so that it
* can be "crashed" to show how recovery works when the server is restarted.
@@ -43,7 +43,7 @@
initialContext = new InitialContext();
// Step 2. Lookup the EJB
- XARecoveryExampleService service = (XARecoveryExampleService)initialContext.lookup("mdb-example/XARecoveryExampleBean/remote");
+ XARecoveryExampleService service = (XARecoveryExampleService)initialContext.lookup("xarecovery-example/XARecoveryExampleBean/remote");
// Step 3. Invoke the sendAndUpdate method
service.send("This is a text message");
Modified: trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java
===================================================================
--- trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java 2009-05-15 04:58:23 UTC (rev 6801)
+++ trunk/src/main/org/jboss/messaging/jms/server/impl/JMSServerDeployer.java 2009-05-15 11:05:43 UTC (rev 6802)
@@ -465,7 +465,6 @@
for (String jndiName : jndiNames)
{
jmsServerControl.createQueue(queueName, jndiName, filterString, durable);
- System.out.println(queueName + jndiName + filterString + durable);
}
}
else if (node.getNodeName().equals(TOPIC_NODE_NAME))
More information about the jboss-cvs-commits
mailing list