[jboss-user] [Beginners Corner] - Re: Cant figure why I cant run this example
RVince99
do-not-reply at jboss.com
Sun Nov 16 23:01:06 EST 2008
I am using the default installation for mysql, root/root on localhost.
\server\default\deploy\mysql-ds.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: mysql-ds.xml 71535 2008-04-01 07:05:03Z adrian at jboss.org $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://127.0.0.1:3306/quickstart</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
root
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
There is also a WEB-INF/application-context.xml, which has connection info as:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<tx:annotation-driven transaction-manager="transactionManager" />
<constructor-arg ref="personService" />
//THANKS!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4189700#4189700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4189700
More information about the jboss-user
mailing list