jtr.enterprise
Class ServiceLocator
java.lang.Object
jtr.enterprise.ServiceLocator
public class ServiceLocator
- extends java.lang.Object
This helper class provides a facility for looking up enterprise java beans.
- Since:
- 1.0
- Version:
- 5.0
- Author:
- Francesco Russo (frusso@dev.java.net)
Method Summary |
static
|
getEJBObject(java.lang.String ejbName,
java.lang.Class clazz,
EnterpriseConfig environment)
This method takes care of looking up the EJB registered under the
ejbName input parameter, of narrowing it to the desired
home class, and finally invokes the create on that home instance. |
static
|
getEJBObject(java.lang.String ejbName,
java.lang.Class clazz,
java.util.Hashtable environment)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceLocator
public ServiceLocator()
getEJBObject
@Deprecated
public static <T> T getEJBObject(java.lang.String ejbName,
java.lang.Class clazz,
java.util.Hashtable environment)
throws LocatorException
- Deprecated.
- This method takes care of looking up the EJB registered under the
ejbName
input parameter, of narrowing it to the desired
home class, and finally invokes the create on that home instance.
- Parameters:
ejbName
- The JNDI name of the EJBclazz
- The class the retrieved instance should be narrowed toenvironment
- The enterprise configuration to be used for instantiating
the initial context
- Returns:
- Object
The remote reference or
null
- Throws:
LocatorException
getEJBObject
public static <T> T getEJBObject(java.lang.String ejbName,
java.lang.Class clazz,
EnterpriseConfig environment)
throws LocatorException
- This method takes care of looking up the EJB registered under the
ejbName
input parameter, of narrowing it to the desired
home class, and finally invokes the create on that home instance.
- Parameters:
ejbName
- The JNDI name of the EJBclazz
- The class the retrieved instance should be narrowed toenvironment
- The enterprise configuration to be used for instantiating
the initial context
- Returns:
- Object
The remote reference or
null
- Throws:
LocatorException