Oracle

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Ferg (Talk | contribs)
(New page: * [http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm Oracle JDBC Frequently Asked Questions] <b>META-INF/resin-web.xml Oracle JDBC configuration - non-XA</b> <code><pre> <...)

Latest revision as of 18:20, 3 February 2008

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