public class GenericServiceLocator extends ServiceLocator
Constructor and Description |
---|
GenericServiceLocator(javax.naming.Context context,
java.lang.String commonPrefix) |
GenericServiceLocator(java.net.URI serverUri,
java.lang.String commonPrefix) |
GenericServiceLocator(java.net.URI serverUri,
java.lang.String username,
java.lang.String password,
java.lang.String commonPrefix) |
GenericServiceLocator(java.net.URI serverUri,
java.lang.String username,
java.lang.String password,
java.lang.String realm,
java.lang.String commonPrefix) |
Modifier and Type | Method and Description |
---|---|
<T> T |
lookup(java.lang.Class<T> type)
Usable with JNDI name formats ending in the full class name of the interface
Such as:
- {interfaceClass}
Or with commonPrefix (supplied in constructor) such as:
- {moduleId}/{interfaceClass}
- ejb/{moduleId}/{interfaceClass}
|
<T,B> T |
lookup(java.lang.Class<T> type,
java.lang.Class<B> ejbClass)
Usable with JNDI name formats comprised of the interfaceClass and ejbClass
For variation, the interface class is the prefix and the ejb class is the
suffix.
|
java.lang.Object |
lookup(java.lang.String name) |
<T> T |
lookup(java.lang.String prefix,
java.lang.Class<T> type)
Usable with JNDI name formats including a varying prefix such as ejbName or deploymentID
and ending in the full class name of the interface
Such as:
- {ejbName}/{interfaceClass}
- {deploymentId}/{interfaceClass}
Or with commonPrefix (supplied in constructor) such as:
- {moduleId}/{ejbName}/{interfaceClass}
- ejb/{moduleId}/{deploymentId}/{interfaceClass}
|
public GenericServiceLocator(java.net.URI serverUri, java.lang.String commonPrefix) throws javax.naming.NamingException
javax.naming.NamingException
public GenericServiceLocator(java.net.URI serverUri, java.lang.String username, java.lang.String password, java.lang.String commonPrefix) throws javax.naming.NamingException
javax.naming.NamingException
public GenericServiceLocator(java.net.URI serverUri, java.lang.String username, java.lang.String password, java.lang.String realm, java.lang.String commonPrefix) throws javax.naming.NamingException
javax.naming.NamingException
public GenericServiceLocator(javax.naming.Context context, java.lang.String commonPrefix)
public java.lang.Object lookup(java.lang.String name)
lookup
in class ServiceLocator
public <T> T lookup(java.lang.Class<T> type)
type
- the interfaceClasspublic <T> T lookup(java.lang.String prefix, java.lang.Class<T> type)
prefix
- such as ejbName or deploymentIdtype
- the interfaceClasspublic <T,B> T lookup(java.lang.Class<T> type, java.lang.Class<B> ejbClass)
type
- the interfaceClassejbClass
- the ejbClass