Oracle

From Resin 3.0

Revision as of 18:20, 3 February 2008 by Ferg (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

META-INF/resin-web.xml Oracle JDBC configuration - non-XA

<web-app xmlns="http://caucho.com/ns/resin">

  <database>
    <name>jdbc/oracle</name>
    <driver>
      <type>oracle.jdbc.pool.OracleConnectionPoolDataSource</type>
      <url>jdbc:oracle:thin:@localhost:1521:''dbname''</url>
      <user>''username''</user>
     <password>''password''</password>
    </driver>
  </database>

</web-app>

Note, the XADataSource is only needed for distributed transactions. If your transactions only include the single data source, the OracleConnectionPoolDataSource will be more efficient.

META-INF/resin-web.xml Oracle XADataSource JDBC configuration

<web-app xmlns="http://caucho.com/ns/resin">

  <database>
    <jndi-name>jdbc/oracle-xa</jndi-name>
    <xa>true</xa>
    <driver>
      <type>oracle.jdbc.xa.client.OracleXADataSource</type>
      <url>jdbc:oracle:thin:@localhost:1521:''dbname''</url>
      <user>''username''</user>
      <password>''password''</password>
    </driver>
    ...
  </database>

</web-app>
</example>
Personal tools