Her er et link om datakildekonfigurationen til JBoss 7, der selvfølgelig fungerer med 7.1
https://community.jboss.org/wiki/DataSourceConfigurationInAS7
Eksemplet er at konfigurere et MySQL-eksempel.
Dette er, hvad jeg gjorde for en Oracle-driver
<datasource jndi-name="java:/sigap_ws_receiver" pool-name="sigap_ws_receiver" enabled="true">
<connection-url>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1524))(CONNECT_DATA=(SERVICE_NAME=profepa)(SERVER=DEDICATED)))</connection-url>
<driver>com.oracle</driver>
<pool>
<min-pool-size>3</min-pool-size>
<max-pool-size>5</max-pool-size>
</pool>
<security>
<user-name>user</user-name>
<password>pass</password>
</security>
<validation>
<exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"/>
</validation>
<timeout>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
</timeout>
</datasource>
Førerens sektion vil se sådan ud:
<drivers>
<driver name="com.oracle" module="com.oracle">
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
</driver>
</drivers>
Min modul.xml er under $JBOSS_HOME\modules\com\oracle\main i jar ojdbc6.jar:
<module xmlns="urn:jboss:module:1.0" name="com.oracle">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>