Configuration templates for Oracle-ds.xml in JBOSS

Source: Internet
Author: User
Tags jboss jboss server

http://blog.csdn.net/bo_hai/article/details/6076979
Configuration template for Oracle-ds.xml in JBOSS.
Code templates: <?xml version= "1.0" encoding= "UTF-8"?>

<!--=====================================================================--
<!---->
<!--JBoss Server Configuration--
<!---->
<!--=====================================================================--

<!--See Http://www.jboss.org/community/wiki/Multiple1PC For information about Local-tx-datasource--
<!--$Id: oracle-ds.xml 88948 2009-05-15 14:09:08z Jesper.pedersen $--
<!--====================================================================--
<!--Datasource config for Oracle originally from Steven Coy--
<!--====================================================================--


<datasources>
<local-tx-datasource>
<jndi-name>OracleDS</jndi-name>
<connection-url>jdbc:oracle:thin:@10.28.10.37:1521:orcl</connection-url>
<!--

Here is a couple of the possible OCI configurations.
For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm

<connection-url>jdbc:oracle:oci: @youroracle-tns-name</connection-url>
Or
<connection-url>jdbc:oracle:oci:@ (description= (address= (host=youroraclehost) (PROTOCOL=TCP) (port=1521)) ( Connect_data= (service_name=yourservicename)) </connection-url>

Clearly, its better to has TNS set up properly.
-
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>hadiantest</user-name>
<password>hadiantest</password>
<!--Uses the Pingdatabase method to check a connection are still valid before handing it out from the pool--
<!--valid-connection-checker-class-name> org.jboss.resource.adapter.jdbc.vendor.oraclevalidconnectionchecker</valid-connection-checker-class-name-- >
<!--Checks the Oracle error codes and messages for fatal errors-
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.oracleexceptionsorter</ Exception-sorter-class-name>
<!--SQL to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-

<!--SQL to existing pooled connection when it's obtained from Pool-the Oraclevalidconnectionchecker is P Refered
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-

<!--corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)--
<metadata>
<type-mapping>Oracle9i</type-mapping>
<min-pool-size>5</min-pool-size>
<max-pool-size>10</max-pool-size>
<idle-timeout-minutes>1</idle-timeout-minutes>
<track-statements/>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<check-valid-connection-sql>select 1 from Dual</check-valid-connection-sql>
<new-connection-sql>select 1 from Dual</new-connection-sql>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.oracleexceptionsorter</ Exception-sorter-class-name>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.oraclevalidconnectionchecker </valid-connection-checker-class-name>
</metadata>
</local-tx-datasource>

</datasources> PS (Postscript): Above is just an Oracle data source configuration template, in the%JBOSS_HOME%/DOCS/EXAMPLES/JCA directory has a variety of database data source configuration template, need to find from here.

Configuration templates for Oracle-ds.xml in JBOSS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.