aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Is this true:  JNDI equals Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Is this true:  JNDI equals Connection Pooling" Watch "Is this true:  JNDI equals Connection Pooling" New topic
Author

Is this true: JNDI equals Connection Pooling

Ed Carrington
Ranch Hand

Joined: Oct 11, 2007
Posts: 77
I have JNDI set up in my Tomcat server.xml and working with an Oracle 9i database for my web app. Is JNDI equal to Connection Pooling? If so I assume I have successfully implemented Connection Pooling for my web app?
[ November 19, 2007: Message edited by: Ed Carrington ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29245
    
139

Originally posted by Ed Carrington:
Is JNDI equal to Connection Pooling?

No. The JNDI is a place to look up the connection pool resource.


If so I assume I have successfully implemented Connection Pooling for my web app?

If you are doing a JNDI lookup to get the connection pool, you have successfully implemented connection pooling.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3216
It is an intrface to directory servers like LDAP etc. For example JDBC is an interface to your database servers. Likewise JNDI is an interface to directory servers like LDAP. Using JNDI you can look up objects, user credentials, printer information etc stored in the underlying LDAP implementations. LDAPs are generally faster to search than Database servers.

You can also look up JDBC connection pools, JMS queues etc using JNDI. Most application servers have a JNDI implementation to facilitate lookups.
[ November 19, 2007: Message edited by: arulk pillai ]

Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Ed Carrington
Ranch Hand

Joined: Oct 11, 2007
Posts: 77
Thanks,

So this below example is how JNDI lookups a connection pool?

server.xml(C:\jakarta-tomcat-4.1.27\conf)



web.xml





database connection part

[ November 19, 2007: Message edited by: Ed Carrington ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this true: JNDI equals Connection Pooling
 
Similar Threads
Resin Over Tomcat
Connection Object pointing to Null
mysql JDBC driver classpath problem.
Connection Pooling using JNDI
Tomcat Server.xml problem in WSSAD 5.1