This content has been marked as final.
Show 2 replies
-
1. Re: Jboss 4.0.1, Hibernate 3 and Tomcat 5.5
ads_green Jul 27, 2005 8:36 AM (in response to ads_green)Sorry - missing some info:
The Tomcat 5.5 global datasource definition is:
Finally, the WAR's context.xml is: -
2. Re: Jboss 4.0.1, Hibernate 3 and Tomcat 5.5
ads_green Jul 27, 2005 8:38 AM (in response to ads_green)The Tomcat 5.5 global datasource definition is:
<GlobalNamingResources> <Resource auth="Container" name="DB1DS" type="javax.sql.DataSource" username="root" password="root" driverClassName="org.gjt.mm.mysql.Driver" url="jdbc:mysql://localhost:3306/db1?autoReconnect=true" factory="org.apache.commons.dbcp.BasicDataSourceFactory"/> </GlobalNamingResources>
Finally, the WAR's context.xml is:<Context docBase="..." path="..."> <ResourceLink global="DB1DS" name="DB1DS" type="javax.sql.DataSource"/> </Context>
However, when deploying what I belive to be the equivlant datasource definition in Jboss 4.0.1 using the file mysql-ds.xml in the deploy directory:<datasources> <local-tx-datasource> <jndi-name>comp/env/DB1DS</jndi-name> <use-java-context>true</use-java-context> <connection-url>jdbc:mysql://localhost:3306/db1?autoReconnect=true</connection-url> <driver-class>org.gjt.mm.mysql.Driver</driver-class> <user-name>root</user-name> <password>root</password> </local-tx-datasource> </datasources>