Java Reference
In-Depth Information
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
We are done with the module installation. Now we need to define a data source in our
configuration that will use this module and hold a pool of connections in our PostgreSQL
database. In order to do this, you can edit standalone.xml/domain.xml , adding a
driver element to the data source's subsystem (be sure to merge this configuration with
any existing data sources in your configuration):
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jta="false"
jndi-name="java:jboss/datasources/wflydevelopment"
pool-name="wflydevelopment" enabled="true">
<connection-url>
jdbc:postgresql://localhost:5432/ticketsystem
</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgresql</driver>
<security>
<user-name>jboss</user-name>
<password>jboss</password>
</security>
</datasource>
<drivers>
<driver name="postgresql" module="org.postgresql"/>
</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 will define the connection path to the database using the
connection-url string and the JDBC driver class with the driver section.
Search WWH ::




Custom Search