Version 6

    I tested the following instructions on a MACOSX Lion. The aim is to connect to Oracle 11g server from

    a JBoss 7 application server.


    Use ojdbc6.jar downloaded from Oracle web site.


    1) mkdir -p <jboss_home>/modules/com/oracle/db/main


    2) cp xxx/ojdbc6.jar <jboss_home>/modules/com/oracle/db/main


    3) create a module.xml file in <jboss_home>/modules/com/oracle/db/main



    <module xmlns="urn:jboss:module:1.0" name="">



            <resource-root path="ojdbc6.jar"/>



            <module name="javax.api"/>

            <module name="javax.transaction.api"/>





    4) modify the configuration file in <jboss_home>/standalone/configuration/standalone.xml


    In the datasources section, add


      <datasource jndi-name="java:/jdbc/Int8rDS" pool-name="OracleDS"

      enabled="true" jta="true" use-java-context="true" use-ccm="true">


                                                                jdbc:oracle:thin:@(DESCRIPTION =

                                                                (ADDRESS =

                                                                (PROTOCOL = TCP)(HOST = = 10121))

                                                                (ADDRESS =

                                                                (PROTOCOL = TCP)(HOST = =



                                                                (LOAD_BALANCE = on)

                                                                (CONNECT_DATA =

                                                                (SERVER =


                                                                (SERVICE_NAME =

                                                                (FAILOVER_MODE = (TYPE =

                                                                SELECT)(METHOD = BASIC)(RETRIES = 200)(DELAY = 15))












    And in the drivers section


    <driver name="ojdbc6.jar" module="">






    5) restart the server and test with the command line


         <jboss_home>/bin/ --controller=localhost:9999





    6) Change the <security> tag in datasource definition in order to use Encrypted passwords (

    The first step is to modify the previous definition inside the standalone.xml config file:







    The second step is to create the security domain as mentioned inside the standalone.xml configuration file. For this we need also to encrypt the password, using the following procedure (from your command line terminal):


    export JBOSS_HOME=path_to_jboss

    export CLASSPATH=$JBOSS_HOME/modules/org/picketbox/main/picketbox-4.0.7.Final.jar:$JBOSS_HOME/modules/org/jboss/logging/main/jboss-logging-3.1.0.GA.jar:$CLASSPATH

    java PasswordXYZ

    Encoded password: -5bbc51443039e029747687c1d9ec6a8d


    <security-domain name="encrypted-ds" cache-type="default">


            <login-module code="" flag="required">

                <module-option name="username" value="dbUserOne"/>

                <module-option name="password" value="-5bbc51443039e029747687c1d9ec6a8d"/>

                <module-option name="managedConnectionFactoryName" value="jboss.jca:service=LocalTxCM,name=OracleDS"/>