JTR 5.0 API Documentation

jtr.enterprise
Class ServiceLocator

java.lang.Object
  extended by 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)

Constructor Summary
ServiceLocator()
           
 
Method Summary
static
<T> T
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
<T> T
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
 

Constructor Detail

ServiceLocator

public ServiceLocator()
Method Detail

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 EJB
clazz - The class the retrieved instance should be narrowed to
environment - 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 EJB
clazz - The class the retrieved instance should be narrowed to
environment - The enterprise configuration to be used for instantiating the initial context
Returns:
Object The remote reference or null
Throws:
LocatorException

The JTR Project is licensed under GPL version 2