Precautions for configuring the JNDI Data Source

Source: Internet
Author: User
If you modify 1 in the original project, modify valuebeanid1_ceclassorg. springframework. jndi. Digest: compenvjndivaluevaluepropertybean2 in applicationContext. xml, and modify res-ref-nam in web. xml.

If 1 is modified on the original project, applicationContext. modify the value bean id = dataSource class = org. springframework. jndi. jndiObjectFactoryBean property name = jndiName valuejava: comp/env/jnpalue/value/property/bean 2, web. modify res-ref-nam in xml

If it is modified on the original project
1. Modify the value in applicationContext. xml.


Java: comp/env/jnpalue


2. Modify res-ref-name in web. xml

Jnpalue
Javax. SQL. DataSource
Container

3. modify or add conf/context. xml in tomcat

4. In tomcat, conf/server. xml Add

Type = "com. jolbox. bonecp. BoneCPDataSource"
Factory = "org. apache. naming. factory. BeanFactory"
DriverClass = "oracle. jdbc. driver. OracleDriver"
Username = "" password = ""
JdbcUrl = ""
IdleMaxAge = "240"
IdleConnectionTestPeriod = "60"
PartitionCount = "3"
AcquireIncrement = "10"
MinConnectionsPerPartition = "10"
MaxConnectionsPerPartition = "20"
ReleaseHelperThreads = "3"/>

The jnpalue of these four parts should be unified. The link between tomcat and the project is the third part. If you want to change it, modify the third part.

If you are creating a new project, tomcat is also new. In this way, you need to import some jar packages to tomcat.

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.