Interface EJBLocalNamingHelper<EJBBinding>
-
public interface EJBLocalNamingHelper<EJBBinding>
This interface is intended for implementation by any container wishing to register on the JNDI NamingHelper whiteboard for the ejblocal: namespace. All services registered on the whiteboard are consulted during object lookup in the appropriate namespace. This replaces the traditional JNDI bind for populating the namespace. In order to support very lazy object creation the ejblocal: lookup consults the whiteboard services looking for a non-null Object to be returned when a registered helper knows about the object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
bind(EJBBinding binding, java.lang.String name, boolean isSimpleName, boolean isDefaultBinding)
This method adds a JNDI lookup string binding reference.java.lang.Object
getObjectInstance(java.lang.String name)
This method is called by JNDI during lookups.void
removeBindings(java.util.List<java.lang.String> names)
Unbind the names from the ejblocal: name space.
-
-
-
Method Detail
-
getObjectInstance
java.lang.Object getObjectInstance(java.lang.String name) throws javax.naming.NamingException
This method is called by JNDI during lookups. If an implementer of this service does not know about the JNDI resource in question it should return null. If the implementer knows about the JNDI resource requested it should return the object instance to be returned on the lookup.- Parameters:
name
- String form of the jndi name, excluding the namespace prefix e.g. for the resource "ejblocal:/ .jar/ # " this name would be " / .jar/ # " - Returns:
- the object instance to be returned on the lookup.
- Throws:
javax.naming.NamingException
- is thrown when an implementation knows about the the JNDI resource, but encounters a problem obtaining an instance to return.
-
bind
boolean bind(EJBBinding binding, java.lang.String name, boolean isSimpleName, boolean isDefaultBinding) throws javax.naming.NamingException
This method adds a JNDI lookup string binding reference.- Parameters:
binding
- The EJBBinding Object that represents a reference to a beanname
- String form of the jndi name, excluding the namespace prefix e.g. for the resource "ejblocal:/ .jar/ # " this name would be " / .jar/ # " isSimpleName
- Flag used to force creation of an AmbiguousEJBReference if an ambiguous simple name binding is detectedisDefaultBinding
- Flag used if this is a default binding- Returns:
- false if the binding is an AmbiguousEJBReference
- Throws:
javax.naming.NamingException
- is thrown if the binding is ambiguous and customBindingsOnErr is FAIL.
-
removeBindings
void removeBindings(java.util.List<java.lang.String> names)
Unbind the names from the ejblocal: name space.- Parameters:
names
- List of names to remove from the application name space.
-
-