WebSphere interview question
What is JNDI, and how do applications look up resources in WebSphere?
Definition
Summary
JNDI (Java Naming and Directory Interface) is the directory where the server registers resources such as data
sources, JMS queues and environment entries under names like jdbc/orders. Applications get them by
injection (@Resource(lookup = "jdbc/orders")) or by lookup, ideally through a resource reference
(java:comp/env/jdbc/orders) that's bound to the real JNDI name at deployment.
Keep reading with a membership
The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.
More WebSphere questions
- Explain the traditional WebSphere Network Deployment architecture: cell, Deployment Manager, nodes, node agents, servers and clusters.
- What is WebSphere Application Server, and how do Liberty and traditional WAS differ?
- How does Liberty's server.xml and feature model work?
- How do you configure a JDBC data source and connection pool in Liberty and in traditional WAS?
- Explain class loading in WebSphere: parent-first versus parent-last, and shared libraries.
- Users see errors and the logs show J2CA0045E: connection not available. How do you investigate?
- WSVR0605W hung thread warnings appear and the application stops responding. What do you do?
- How would you migrate an application from traditional WebSphere to Liberty?