Friday, October 26, 2012

Jboss AS 7 Configuration for Oracle


Jboss Configuration


Download the Jboss server setup from http://www.jboss.org/as7

Extract the zip to your local folder say it will be extracted to D:\Jboss

And rename the folder as jboss 7.1.0 (optional)

Jboss Configuration for Oracle

Open the below path jboss 7.1.0\modules\com

Create a new folder oracledatabase

Open folder oracledatabase and create a new folder oracle

Open folder oracle and create a new folder main

Open folder main and place an ojdbc6.jar

And create an xml file module.xml

Copy the below xml content to module.xml



<?xml version="1.0" encoding="UTF-8"?>

<module xmlns="urn:jboss:module:1.0" name="com.oracledatabase.oracle">

    <resources>
        <resource-root path="ojdbc6.jar"/>
        <!-- Insert resources here -->
    </resources>
    <dependencies>
        <module name="javax.api"/>
    </dependencies>

</module>


Open folder D:\Jboss\jboss 7.1.0\standalone\configuration

Open standalone.xml and add the below driver entry

  <drivers>
                    <driver name="oracle" module="com.oracledatabase.oracle">
                        <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
                    </driver>
</drivers>


Add JBOSS_HOME in environment variable and value as D:\Jboss\jboss 7.1.0

Now your Jboss is configured to access Oracle database

You can start the Jboss server by running D:\Jboss\jboss 7.1.0\bin\standalone.bat

No comments: