Tuesday, December 11, 2012

Global JNDI Names standardized in JEE6

The Enviromental Naming Context (ENC) is a JNDI context that can be accessed via java:comp/env.

This Context is used to create portable JNDI names for EJBs. Names in the ENC are created with entries in a deployment descriptor. The JEE6 adds support for sandard JNDI names of EJBs withour requiring usage of the ENC:

java:global[/<app-name>]/<module-name>/<bean-name>

java:app[/<module-name>]/<bean-name>

java:module/<bean-name>

app-name is same as ear without extension, module-name is ejb jar or war name without extension

also CDI can target specific JNDI name


@EJB(mappedName=”java:global/ejbmodule/FooBean”)
FooRemote foo;

No comments:

Post a Comment