Interface RemoteJavaColonNamingHelper
public interface RemoteJavaColonNamingHelper
This interface is intended for implementation by any container wishing to
register on the JNDI NamingHelper whiteboard for the java: 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 java: 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 TypeMethodDescriptiongetRemoteObjectInstance
(NamingConstants.JavaColonNamespace namespace, String name) This method is called by JNDI during lookups.boolean
hasRemoteObjectWithPrefix
(NamingConstants.JavaColonNamespace namespace, String name) Collection<? extends NameClassPair>
listRemoteInstances
(NamingConstants.JavaColonNamespace namespace, String nameInContext)
-
Method Details
-
getRemoteObjectInstance
RemoteObjectInstance getRemoteObjectInstance(NamingConstants.JavaColonNamespace namespace, 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:
namespace
- enum representing the particular java: namespace being queried, seeNamingConstants.JavaColonNamespace
name
- String form of the jndi name, excluding the namespace prefix e.g. for the resource "java:comp/env/jdbc/test" this name would be "jdbc/test"- 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.
-
hasRemoteObjectWithPrefix
boolean hasRemoteObjectWithPrefix(NamingConstants.JavaColonNamespace namespace, String name) throws NamingException - Parameters:
namespace
- enum representing the particular java: namespace being queried, seeNamingConstants.JavaColonNamespace
name
- String form of the jndi name prefix, excluding the namespace prefix e.g. for the resource prefix "java:comp/env/jdbc" this name would be "jdbc"- Returns:
- true if the implementer of this service knows that there is JNDI resource whose name is started with the jndi name prefix specified
- Throws:
NamingException
-
listRemoteInstances
Collection<? extends NameClassPair> listRemoteInstances(NamingConstants.JavaColonNamespace namespace, String nameInContext) throws NamingException - Parameters:
namespace
- enum representing the particular java: namespace being queried, seeNamingConstants.JavaColonNamespace
nameInContext
- String form of the jndi name, excluding the namespace prefix e.g. for the resource "java:comp/env/jdbc/test" this name would be "jdbc/test". "" corresponds to the namespace root, and null is not valid.- Returns:
- a Collection of NameClassPair objects
- Throws:
NamingException
-