Annotation Type NamingContext

public @interface NamingContext

Used to enable JNDI dependency injection.

A member can be injected with an object from the JNDI tree if a NamingContext is available for the specified member. Such a NamingContext can be defined at package-, class- or at member-level. There are two more requirements for members to support JNDI injection:

Members marked with this annotation MUST also be annoted with Inject, otherwise the beanlet definition fails.

XML Representation

The following xml-fragment shows how to express this annotation in xml.

 <beanlets xmlns=""
   <beanlet name="foo" type="com.acme.Foo">
       <jndi:property name="java.naming.factory.initial" value="com.sun.jndi.cosnaming.CNCtxFactory"/>

See Also:
Inject, Wiring

Optional Element Summary
 NamingProperty[] value
          Used to specify properties for the naming context.


public abstract NamingProperty[] value
Used to specify properties for the naming context.


Copyright © 2006-2012. All Rights Reserved.