Detailed description of the configuration of Spring Hibernate connecting to the oracle database, hibernateoracle

Source: Internet
Author: User

Detailed description of the configuration of Spring Hibernate connecting to the oracle database, hibernateoracle

Detailed description of Spring Hibernate connection to oracle Database Configuration

The configuration of the jdbc. properties file is as follows:

driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc\:oracle\:thin\:@localhost\:1521\: database=OA username=oa password=oa initialSize=2 maxActive=10 maxIdle=2 minIdle=2 removeAbandoned=true removeAbandonedTimeout=25200 maxWait=30000 validationQuery = select 1 from dual testOnBorrow=true 

The bean. xml file configuration is as follows:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">  <property name="driverClassName" value="${driverClassName}"/>  <property name="url" value="${url}${database}"/>  <property name="username" value="${username}"/>  <property name="password" value="${password}"/>  <property name="initialSize" value="${initialSize}"/>  <property name="maxActive" value="${maxActive}"/>  <property name="maxIdle" value="${maxIdle}"/>  <property name="minIdle" value="${minIdle}"/> </bean>  

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

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.