jndi configuration in tomcat

12
 Saturday, March 24, 2012 L&T Infotech Proprietary Page 1 of 12 Apache Tomcat 6.0 JNDI Datasource HOW-TO Table of Contents   Introduction  DriverManager, the service provider mechanism and memory leaks   Database Connection Pool (DBCP) Configurations  1. Installation 2. Preventing database connection pool leaks  3. MySQL DBCP Example 4. Oracle 8i, 9i & 10g 5. PostgreSQL  Non-DBCP Solutions  Oracle 8i with OCI client 1. Introduction 2. Putting it all together  Common Problems 1. Intermittent Database Connection Failures  2. Random Connection Closed Exceptions  3. Context versus GlobalNamingResources  4. JNDI Resource Naming and Realm Interaction  Introduction  JNDI Datasource configuration is covered extensively in the JNDI-Resources-HOWTO. However, feedback from tomcat-user has shown that specifics for individual configurations can be rather tricky. Here then are some example configurations that have been posted to tomcat-user for popular databases and some general tips for db usage. You should be aware that since these notes are derived from configuration and/or feedback posted to tomcat-user YMMV :-). Please let us know if you have any other tested configurations that you feel may be of use to the wider audience, or if you feel we can improve this section in anyway. Please note that JNDI resource configuration changed somewhat between Tomcat 5.0.x a nd Tomcat 5.5.x. You will most likely need to modify older JNDI resource configurations to match the syntax in the example below in order to make them work in Tomcat 6.x.x. Also, please note that J NDI DataSource configuration in general, and this tutorial in particular, assumes that you have read and understood the  Context and Host configuration references, including the section about Automatic Application Deplo yment in the latter reference.

Upload: skyagrawal8379

Post on 06-Apr-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 1/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 3/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 4/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 5/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 6/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 7/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 8/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 9/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 10/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 11/12

8/2/2019 JNDI Configuration in Tomcat

http://slidepdf.com/reader/full/jndi-configuration-in-tomcat 12/12