Search on this blog

Friday, May 9, 2008

Creating oracle data-source for jboss

To create a data source for the Oracle JDBC driver, edit the jboss.jcml file which is located in the JBoss/conf/ directory. For example:
C:\\jboss\conf\catalina

There is one modification, and one addition to make to this file.

  1. Replace this entry:
        
    org.hsqldb.jdbcDriver

    With this entry:

        
    oracle.jdbc.driver.OracleDriver,org.hsqldb.jdbcDriver

  2. Add the following entry just below the that was just modified. Change the properties of the URL, JDBCUser, and Password to match your database configuration.
                  name="DefaultDomain:service=XADataSource,name=OracleDS">
    OracleDS

    org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl


    jdbc:oracle:thin:@rcleveng-sun:1521:RCLEVENG

    scott
    tiger
    0
    10

The first modification allows the Oracle JDBC driver to be loaded and thus registered with the JDBC DriverManager class.

The second modification creates a JDBC data source bound to the JNDI name of java:/OracleDS.

0 comments:

Post a Comment

Featured Video

Featured Article

Poems