-
1. Re: Configure mysql-ds.xml in Jboss 7.1
elvisd Jul 2, 2012 8:36 AM (in response to bajrang_asthana)Here my standalone.xml snippet
<subsystem xmlns="urn:jboss:domain:datasources:1.1">
<datasources>
<datasource jndi-name="java:/myDS" pool-name="my-pool" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://127.0.0.1:3306/thedb</connection-url>
<driver>mysql</driver>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>user</user-name>
<password>Zecret</password>
</security>
<statement>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
...
<drivers>
<driver name="mysql" module="org.mysql"/>
</drivers>
I had to define a module org/mysql in modules directory (to do this create a org/mysql/main folder structure in modules, copy mysql-jdbc.jar in it, and adapt a module.xml copied from another module)
hth
-
3. Re: Configure mysql-ds.xml in Jboss 7.1
bajrang_asthana Jul 2, 2012 9:43 AM (in response to elvisd)Thanks, I have defined datasource configuration in standalone.xml like below-
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:/MySqlDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/mm?autoReconnect=true</connection-url>
<driver>mysql</driver>
<security>
<user-name>bajrang</user-name>
<password>root</password>
</security>
</datasource>
<drivers>
<driver name="mysql" module=".">
</driver>
</drivers>
</datasources>
</subsystem>
But still getting below error-
service status report
JBAS014775: New missing/unsatisfied dependencies:
service jboss.jdbc-driver.mysql (missing) dependents: [service jboss.data-source.java:/MySqlDS]
I have copied the jdbc driver in the root directory of .ear file.
-
4. Re: Configure mysql-ds.xml in Jboss 7.1
elvisd Jul 2, 2012 9:46 AM (in response to bajrang_asthana)The module is deployed before your ear, so i think that the jat must not be in the ear itself.
Please check the linked video.