Deploy your MySQL database as 
C:\jboss-4.0.1sp1\server\devcon\deploy\mysql-ds.xml (as you did)

Leave C:\jboss-4.0.1sp1\server\devcon\deploy\jms\mysql-jdbc2-service.xml ALONE 
!!!! This is for JMS not CMP

Either list you MySQL database as the default in jbosscmp-jdbc.xml (as you 
did), or specify it explicity in your persistence.xml like this:

<persistence>
  |    <persistence-unit name="jsEntities">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/bookingDatasource</jta-data-source>
  |       <properties>
  |          <property name="hibernate.dialect" 
value="org.hibernate.dialect.MySQLDialect"/>
  |          <property name="hibernate.transaction.manager_lookup_class" 
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
  |          <property name="hibernate.transaction.flush_before_completion" 
value="true"/>
  |          <property name="hibernate.hbm2ddl.auto" value="update"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |       </properties>
  |    </persistence-unit>
  | </persistence>

Obviously the <jta-data-source> name has to match the JNDI name used in 
mysql-ds.xml

Hope this helps

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3926771#3926771

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3926771


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to