[jboss-cvs] JBoss Messaging SVN: r7069 - in trunk/examples/javaee: ejb-jms-transaction and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 27 08:54:34 EDT 2009


Author: jmesnil
Date: 2009-05-27 08:54:34 -0400 (Wed, 27 May 2009)
New Revision: 7069

Modified:
   trunk/examples/javaee/common/build.xml
   trunk/examples/javaee/ejb-jms-transaction/build.xml
   trunk/examples/javaee/ejb-jms-transaction/readme.html
   trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml
   trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml
   trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java
Log:
Java EE examples

* fixed ejb-jms-transaction example to make sure it works
  against JBoss AS 5.1.0 GA (+ jms config fix + readme update)

Modified: trunk/examples/javaee/common/build.xml
===================================================================
--- trunk/examples/javaee/common/build.xml	2009-05-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/common/build.xml	2009-05-27 12:54:34 UTC (rev 7069)
@@ -135,7 +135,7 @@
          </fileset>
       </copy>
       <exec dir="${jboss.home}/bin" executable="sh">
-         <arg line="run.sh -b 192.168.0.10 -c ${example.name}-example-profile"/>
+         <arg line="run.sh -c ${example.name}-example-profile"/>
       </exec>
    </target>
 

Modified: trunk/examples/javaee/ejb-jms-transaction/build.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/build.xml	2009-05-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/ejb-jms-transaction/build.xml	2009-05-27 12:54:34 UTC (rev 7069)
@@ -29,6 +29,15 @@
 
    <import file="../common/build.xml"/>
 
+   <target name="copy-resources">
+      <property name="example-profile" value="${jboss.home}/server/${example.name}-example-profile"/>
+      <delete>
+   	     <fileset dir="${example-profile}/deploy/">
+	        <include name="hsqldb-ds.xml"/>
+         </fileset>
+      </delete>
+   </target>
+   
    <target name="run">
       <antcall target="runExample">
          <param name="example.classname" value="org.jboss.javaee.example.EJBClientExample"/>

Modified: trunk/examples/javaee/ejb-jms-transaction/readme.html
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/readme.html	2009-05-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/ejb-jms-transaction/readme.html	2009-05-27 12:54:34 UTC (rev 7069)
@@ -31,13 +31,13 @@
          database documentation to configure it appropriately.</p>
      <p>To use MySQL with JBoss AS 5</p>
      <ul>
-         <li>remove HSQLDB configuration from default-with-jbm2 deployment</li>
-         <pre>
-             <code>rm $JBOSS_HOME/server/default-with-jbm2/deploy/hsqldb-ds.xml</code>
-         </pre>
-         <li>copy <a href="config/mysql-ds.xml">mysql-ds.xml</a> to <code>$JBOSS_HOME/server/default-with-jbm2/deploy/</code></li>
-         <li>copy MySQL JDBC jar to <code>$JBOSS_HOME/server/default-with-jbm2/lib/</code></li>
+        <li>copy MySQL JDBC jar to <code>$JBOSS_HOME/server/default-with-jbm2/lib/</code></li>
      </ul>
+     <p>During the deployment, the example will:</p>
+     <ul>
+        <li>remove HSQLDB configuration (<code>hsqldb-ds.xml</code>) from the profile</li>
+        <li>copy <a href="config/mysql-ds.xml"><code>mysql-ds.xml</a></code> to to the profile</li>
+     </ul>
      
      <p>MySQL is configured to connect to a <code>jbossdb</code> database using the <code>jboss</code>/<code>jboss</code> credentials
      <p>MySQL configuration file defines two DataSources:</p>

Modified: trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml	2009-05-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/ejb-jms-transaction/server/jbm-jms.xml	2009-05-27 12:54:34 UTC (rev 7069)
@@ -3,7 +3,7 @@
             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"/>
@@ -13,4 +13,4 @@
    <queue name="testQueue">
       <entry name="/queue/testQueue"/>
    </queue>
-</configuration>
\ No newline at end of file
+</configuration>

Modified: trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml
===================================================================
--- trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml	2009-05-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/ejb-jms-transaction/server/mysql-ds.xml	2009-05-27 12:54:34 UTC (rev 7069)
@@ -20,7 +20,7 @@
   </xa-datasource>
     
   <local-tx-datasource>
-    <jndi-name>DefaultMessagingDS</jndi-name>
+    <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>

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-27 12:43:11 UTC (rev 7068)
+++ trunk/examples/javaee/ejb-jms-transaction/src/org/jboss/javaee/example/server/SendMessageBean.java	2009-05-27 12:54:34 UTC (rev 7069)
@@ -49,7 +49,7 @@
    public void createTable() throws Exception
    {
       InitialContext ic = new InitialContext();
-      DataSource ds = (DataSource)ic.lookup("java:/DefaultMessagingDS");
+      DataSource ds = (DataSource)ic.lookup("java:/DefaultDS");
       java.sql.Connection con = ds.getConnection();
       
       // check if the table exists:




More information about the jboss-cvs-commits mailing list