org.sape.ejbutils.homefactory
Class HomeFactory

java.lang.Object
  extended byorg.sape.ejbutils.homefactory.HomeFactory

public class HomeFactory
extends Object

HomeFactory is a helper class for finding EJB home interfaces using RMI-JRMP. (RMI-IIOP is not supported). It expects a JNDI provider name and an EJB JNDI name to return the EJBHome of that bean.


Field Summary
private static org.apache.commons.logging.Log log
           
 
Constructor Summary
private HomeFactory()
          Private Constructor: Don't let anyone instantiate this class
 
Method Summary
static javax.ejb.EJBHome findHome(User user, String jndiProviderName, String ejbJndiName)
          Finds the Home interface for an EJB using the supplied parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
Constructor Detail

HomeFactory

private HomeFactory()
Private Constructor: Don't let anyone instantiate this class

Method Detail

findHome

public static javax.ejb.EJBHome findHome(User user,
                                         String jndiProviderName,
                                         String ejbJndiName)
                                  throws HomeFactoryException
Finds the Home interface for an EJB using the supplied parameters.

Parameters:
user - The user object for authenticating to the JNDI service. If this parameter is null, the behaviour is determined by the JNDI service provider.
jndiProviderName - The name of the JNDI provider whose services are desired. If this parameter is set to null, you will get an InitialContext to the JNDI provider on the local server. JNDI provider names and their properties are stored in /jndi/jndi-providers.xml. JndiProvider details can be found in the carbon-contrib library.
ejbJndiName - The JNDI name of the EJB
Returns:
The home interface
Throws:
InvalidConfigurationException - if any required configration value does not exist
HomeFactoryNamingException - if JNDI initial context cannot be resolved
HomeFactoryClassCastException - if the object looked up using JNDI is not an EJBHome object
HomeFactoryException


Copyright 2003 Sapient Corporation. All Rights Reserved.