Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiServiceLocator


public interface EbiServiceLocator

Interface that defines a service locator for JNDI and J2EE resources. It's used to perform JNDI lookups and return J2EE resources including EJBs, connections, and UserTransaction objects.


Method Summary
 Connection getDbConnection()
          Gets a pooled database connection from the application server.
 Connection getDbConnection(String resRefName)
          Gets a pooled database connection from the application server for a named data source.
 EJBHome getEjbHome(String ejbRefName)
          Gets an EJB home interface from the application server.
 Object getEnvEntry(String envEntryName)
          Gets the value of an environment entry in the JNDI environment context.
 UserTransaction getUserTransaction()
          Gets a UserTransaction interface from the application server.
 void setInitialContext(Hashtable properties)
          Sets the properties for an initial context.
 

Method Detail

getDbConnection

public Connection getDbConnection()
                           throws EboUnrecoverableSystemException
Gets a pooled database connection from the application server. Callers must explicitly close the connection and any associated statements. This method will return a connection for the default data source.
Returns:
An implementation of java.sql.Connection.

getDbConnection

public Connection getDbConnection(String resRefName)
                           throws EboUnrecoverableSystemException
Gets a pooled database connection from the application server for a named data source. Callers must explicitly close the connection and any associated statements.
Parameters:
resRefName - The reference name of the data source from which a connection should be returned. By convention, this name should be prefixed with jdbc/. This method supports lookups using both the environment context and an initial context.
Returns:
an implementation of java.sql.Connection.

getEnvEntry

public Object getEnvEntry(String envEntryName)
                   throws EboUnrecoverableSystemException
Gets the value of an environment entry in the JNDI environment context.
Parameters:
envEntryName - The name of the entry for which a value should be returned.
Returns:
The value associated with envEntryName.

getEjbHome

public EJBHome getEjbHome(String ejbRefName)
                   throws EboUnrecoverableSystemException
Gets an EJB home interface from the application server. Callers can then cast the interface to the specific home interface required.
Parameters:
ejbRefName - The reference name of the EJB for which you want a home interface. By convention, this name should be prefixed with ejb/.
Returns:
An implementation of javax.ejb.EJBHome.

getUserTransaction

public UserTransaction getUserTransaction()
                                   throws EboUnrecoverableSystemException
Gets a UserTransaction interface from the application server.
Returns:
An implementation of javax.transaction.UserTransaction.

setInitialContext

public void setInitialContext(Hashtable properties)
                       throws EboUnrecoverableSystemException
Sets the properties for an initial context.
Parameters:
properties - A Hashtable specifying the properties for the initial context environment.

Novell exteNd
Director 5.2 API