This content has been marked as final.
Show 1 reply
-
1. Re: JNDI Datasource points to MySQL database
jcash Aug 31, 2005 6:48 AM (in response to mdeyab)Create a file called timesheet-ds.xml in your deploy directory with the following contents (changing server, username , password and testsqlsettings where relivent).
<datasources> <local-tx-datasource> <jndi-name>Timesheet</jndi-name> <connection-url>jdbc:mysql://server:3306/jbossdb</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>username</user-name> <password>password</password> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name> <!-- sql to call when connection is created <new-connection-sql>testsql</new-connection-sql> --> <!-- sql to call on an existing pooled connection when it is obtained from pool <check-valid-connection-sql>testsql</check-valid-connection-sql> --> <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) --> <metadata> <type-mapping>mySQL</type-mapping> </metadata> </local-tx-datasource> </datasources>