Interface LocalColonEJBNamingHelper<EJBBinding>


public interface LocalColonEJBNamingHelper<EJBBinding>
This interface is intended for implementation by any container wishing to register on the JNDI NamingHelper whiteboard for the local:ejb 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 local:ejb lookup consults the whiteboard services looking for a non-null Object to be returned when a registered helper knows about the object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    bind(EJBBinding binding, String name, boolean isSimpleName, boolean isDefaultBinding)
    This method adds a JNDI lookup string binding reference.
    This method is called by JNDI during lookups.
    void
    Unbind the names from the local:ejb name space.
  • Method Details

    • getObjectInstance

      Object getObjectInstance(String name) throws 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 "local:ejb/.jar/#" this name would be "/.jar/#"
      Returns:
      the object instance to be returned on the lookup.
      Throws:
      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, String name, boolean isSimpleName, boolean isDefaultBinding) throws NamingException
      This method adds a JNDI lookup string binding reference.
      Parameters:
      binding - The EJBBinding Object that represents a reference to a bean
      name - String form of the jndi name, excluding the namespace prefix e.g. for the resource "local:ejb//.jar/#" this name would be "/.jar/#"
      isSimpleName - Flag used to force creation of an AmbiguousEJBReference if an ambiguous simple name binding is detected
      isDefaultBinding - Flag used if this is a default binding
      Returns:
      false if the binding is an AmbiguousEJBReference
      Throws:
      NamingException - is thrown if the binding is ambiguous and customBindingsOnErr is FAIL.
    • removeBindings

      void removeBindings(List<String> names)
      Unbind the names from the local:ejb name space.
      Parameters:
      names - List of names to remove from the application name space.