A bean’s special place- java:comp/env

Your bean is entitled to a JNDI context all its own. A special place that’s just for your bean, where your bean can look things up. It all starts with an InitialContext, but the java:comp/env subcontext is where the bean begins navigating when he wants to look something up.

image with no caption

Get Head First EJB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.