Java Reference
In-Depth Information
jndi-name="java:jboss/datasources/
jbossas7development"
pool-name="jbossas7development"
enabled="true">
<connection-url>
jdbc:mysql://localhost:3306/
ticketsystem
</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<security>
<user-name>jboss</user-name>
<password>jboss</password>
</security>
</datasource>
<drivers>
<driver name="mysql"
module="com.mysql"/>
</drivers>
</datasources>
</subsystem>
As you can see, the new configuration file borrows the same XML schema definition
from the earlier JBoss AS configurations, so it should not be difficult to migrate to the
new schema. Basically, you would define the connection path to the database using
the
connection-url
string and the JDBC driver class with the
driver
section.
Note
Since JBoss AS 7.1.0, it's mandatory that the data source be bound to the
java:/
or
java:jboss/
JNDI namespace. This will standardize the resources
definition among developers, avoiding bizarre JNDI bindings.