0 Replies Latest reply on Feb 21, 2006 11:21 AM by chaser

    Weird phenominon with "Local Interface" in JBoss

    chaser

      Hi, all

      I am following the book and its exercises. I used Mysql as the database. Everything looks fine, till I reached the "ex05_3". Though at last, it works fine, but I noticed something weird:

      when I issued:

      ant run.client_53

      it silently said "build success" without the output supposed to be in the screen.

      I did this "twice".

      Then when I did this "3rd" time, I got the output!! And it seems that execpt the first 2 times, I will get the results.

      Why is that? Anyone has any idea?

      P.S. The extra descriptor file for MySQl data sourse and of course the titan-ds.xml:

      === jbosscmp-jdbc.xml ==

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jbosscmp-jdbc PUBLIC
      "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
      "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">

      <jbosscmp-jdbc>


      java:/MySqlDS
      <datasource-mapping>mySQL</datasource-mapping>


      <enterprise-beans>

      <ejb-name>CabinEJB</ejb-name>
      <table-name>Cabin</table-name>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>name</field-name>
      <column-name>NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>deckLevel</field-name>
      <column-name>DECKLEVEL</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>shipId</field-name>
      <column-name>SHIPID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>bedCount</field-name>
      <column-name>BEDCOUNT</column-name>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>

      === titan-ds.xml ==

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->

      <!-- $Id: oracle-ds.xml,v 1.1 2002/07/22 22:57:24 d_jencks Exp $ -->
      <!-- ==================================================================== -->
      <!-- Datasource config for Oracle originally from Steven Coy -->
      <!-- ==================================================================== -->


      <local-tx-datasource>
      <jndi-name>MySqlDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/workbook</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>yourusername</user-name>
      yourpassword
      </local-tx-datasource>