Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vinaya,
- In order to install that version of the Oracle Database Driver you will have to do a few things first:
- Stop Jboss and remove the jar file that you placed in JBOSS_HOME/standalone/deployments
- Next,
- In JBOSS_HOME/modules
- Run: mkdir –p com/oracle/ojbc14/main
- In that location edit this new file
- vi module.xml
- In there will be the information for the driver deployment
- <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc14">
- <resources>
- <resource-root path="ojdbc14.jar"/>
- </resources>
- <dependencies>
- <module name="javax.api"/>
- </dependencies>
- </module>
- Add this next section to to “drivers section” of standalone.xml as this driver in not jdbc4 compliant.
- <driver name="oracleDriver" module="com.oracle.ojdbc14">
- <driver-class>oracle.jdbc.OracleDriver</driver-class>
- <xa-datasource-class>
- oracle.jdbc.xa.client.OracleXADataSource
- </xa-datasource-class>
- </driver>
- Copy your driver ojdbc14.jar to $JBOSS_HOME/modules/com/oracle/ojdbc6/main
- Now create your driver definition in the standalone.xml file
- vi $JBOSS_HOME/standalone/configuration/standalone.xml
- Look for the following text:
- subsystem xmlns="urn:jboss:domain:datasources:1.0">
- In that subsystem add this snippet:
- <driver name="oracle" module="com.oracle.ojdbc14">
- <xa-datasource-class>
- oracle.jdbc.OracleDriver
- </xa-datasource-class>
- </driver>
- And last, create your data source configuration. Put this next snippet below the <datasources> element. Modify this data as necessary for your configuration
- <datasource jndi-name="WorkCenterDS" pool-name="OracleDS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
- <connection-url>jdbc:oracle:thin:@localhost:1521:oradb1</connection-url>
- <driver>oracle</driver>
- <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
- <pool>
- <prefill>true</prefill>
- <use-strict-min>false</use-strict-min>
- <flush-strategy>FailingConnectionOnly</flush-strategy>
- </pool>
- <security>
- <user-name>user1</user-name>
- <password>1234</password>
- </security>
- </datasource>
Add Comment
Please, Sign In to add comment