steps to create datasource in Jboss eap

You need to create oraclejdbcmain folder under modules and keep the module.xml and ojdbc6.jar there

one

 

module.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">
    <resources>
        <resource-root path="ojdbc6.jar"/>
    </resources>
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
    </dependencies>
</module>


In standlone.xml / domain.xml you need to add the datasource and driver entry

<datasource jndi-name="java:jboss/datasources/OracleDS" pool-name="OracleDS" enabled="true" use-java-context="true">
	<connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
	<driver>OracleJDBCDriver</driver>
	<security>
		<user-name>SYSTEM</user-name>
		<password>Passw0rd</password>
	</security>
</datasource>
<drivers>
	<driver name="OracleJDBCDriver" module="oracle.jdbc" />
</drivers>

 

You should be able to see your datasource from the console.

 

1