Question: What is the Difference Between JNDI and JDBC?
Answer: JDBC is java database API, while JNDI is java native directory API.
The main thing in here is that in a JNDI directory you’re actually storing a JDBC DataSource, so, you’re simply using JDBC and obtain a Connection via JNDI lookup.
In short words: JDBC is a Database realm, JNDI lets you store Objects in a virtual context (the Directory) that can be local, remote (Implementation details usually don’t matters).
You access this context via names, obtaining stored objects, it is good to share things among different modules.
JNDI is the directory that contains the list of objects defined on the server. When the user requests for a connection pool, the code would look for the object on the JNDI and would get the requested connection pool from the data source. JDBC is the one which does all the interactions with the database. An application will lookup the JNDI to get a connection pool for it to interact with the database.
All Weblogic Interview Questions
Weblogic VideosDuration: 20-25 Hours | Version: 12c, 11g | Admin
Free Bundle Access
Course Future Updates