|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cle.persistence.ConnectionProvider | +--oracle.clex.persistence.jndi.JndiObjectProvider | +--oracle.clex.persistence.ejb.EJBHomeProvider
Provides a specific EJBHome.
Attributes can automatically be set and loaded by specifying
properties in the "cle-providers.xml
" file at the root
of the classpath (ie. WEB-INF/classes/cle-providers.xml).
See the http://xmlns.oracle.com/ias/mvc/cle-providers.dtd
for more on structure of the file.
Unique requisiste properties not in parents:
<?xml version="1.0" standalone="yes"?> <!DOCTYPE cle-providers SYSTEM "http://xmlns.oracle.com/ias/mvc/cle-providers.dtd"> <cle-providers> <provider name="personnel_ejb" class="oracle.clex.persistence.ejb.EJBHomeProvider"> <property name="user" value="admin"/> <property name="password" value="oracle"/> <property name="jndiname" value="PersonnelManager"/> <property name="connectionstring" value="ormi://localhost/personnel"/> <property name="host" value="localhost"/> <property name="contextfactory" value="com.evermind.server.ApplicationClientInitialContextFactory"/> <property name="classname" value="oracle.demo.personnel.persistence.ejb_cmp.PersonnelManagerHome"/> <property name="persistencebase" value="oracle.demo.personnel.persistence.ejb_cmp"/> lt;property name="failover" value=""/> </provider> </cle-providers>
public Vector aHandlerMethod(Object sessionId, <ArgumentType> aArgument) throws Exception { MyEJBHome home = (MyEJBHome)getConnection(sessionId); MyEJB myEJB = (MyEJB)home.create(); .... use the ejb here ... releaseConnection(sessionId); return theResult; } // end aHandlerMethod
Field Summary | |
protected java.lang.String |
classname
The classname for the EJBHome that we are looking for. |
static java.lang.String |
CLASSNAME
Constant for classname |
protected java.lang.String |
contextFactory
|
static java.lang.String |
CONTEXTFACTORY
Constant for contextfactory |
protected javax.ejb.EJBHome |
homeInterface
The single Home Interface for this provider. |
protected java.lang.String |
NON_SSL_LOGIN
|
Fields inherited from class oracle.clex.persistence.jndi.JndiObjectProvider |
jndiName, JNDINAME, jndiObject |
Fields inherited from class oracle.cle.persistence.ConnectionProvider |
BASE64, connection, connectionString, CONNECTIONSTRING, defaultProperties, deploymentKey, driverType, DRIVERTYPE, encryptionType, ENCRYPTIONTYPE, failover, FAILOVER, host, HOST, NO_SCOPE, NONE, password, PASSWORD, persistenceBase, PERSISTENCEBASE, port, PORT, releasedConnectionIds, REQUEST_SCOPE, scope, SCOPE, SESSION_SCOPE, sessionConnectionIds, sid, SID, USER, userName |
Constructor Summary | |
EJBHomeProvider()
|
|
EJBHomeProvider(java.util.Properties properties)
|
Method Summary | |
protected void |
addPropertyKeys()
Each subclass should overload or override this method to include all the properties that it will use. |
void |
connect()
Get the EJBHome interface for an EJB using its own provider info |
protected javax.ejb.EJBHome |
createHomeInterface()
|
java.lang.String |
getClassname()
|
java.lang.Object |
getConnection(java.lang.Object sessionId)
Returns a connection |
java.lang.Object |
getConnection(java.lang.Object sessionId,
int failover)
Does nothing... |
java.lang.String |
getContextFactory()
|
javax.naming.Context |
getInitialContext()
Get an IntitialContext so that we can find the Home Interface. |
boolean |
isConnected()
Returns the state of the connection for the Provider |
void |
releaseConnection(java.lang.Object sessionId)
Release the connection associated to the sessionId. |
void |
setClassname(java.lang.String aClassname)
|
void |
setContextFactory(java.lang.String aFactoryName)
|
Methods inherited from class oracle.clex.persistence.jndi.JndiObjectProvider |
applyDynamicProperties, disconnect, findJndiObject, getJndiName, hashCode, isSame, setJndiName |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.ejb.EJBHome homeInterface
public static final java.lang.String CLASSNAME
public static final java.lang.String CONTEXTFACTORY
protected java.lang.String classname
protected java.lang.String contextFactory
protected java.lang.String NON_SSL_LOGIN
Constructor Detail |
public EJBHomeProvider()
public EJBHomeProvider(java.util.Properties properties)
Method Detail |
protected void addPropertyKeys()
addPropertyKeys
in class JndiObjectProvider
public java.lang.Object getConnection(java.lang.Object sessionId)
getConnection
in class JndiObjectProvider
public java.lang.Object getConnection(java.lang.Object sessionId, int failover)
getConnection
in class JndiObjectProvider
public void releaseConnection(java.lang.Object sessionId)
releaseConnection
in class ConnectionProvider
public void connect()
connect
in class JndiObjectProvider
public boolean isConnected()
public java.lang.String getClassname()
public void setClassname(java.lang.String aClassname)
public java.lang.String getContextFactory()
public void setContextFactory(java.lang.String aFactoryName)
protected javax.ejb.EJBHome createHomeInterface() throws java.lang.Exception
public javax.naming.Context getInitialContext() throws javax.naming.NamingException, java.lang.Exception
NOTE: This method first tries to get an InitialContext without programmatically passing environment properties. If that fails to return a valid Context, then and only then are the properties for this provider used. This allows this provider to use a jndi.properties file, for example, to get the environment in a standard way.
getInitialContext
in class JndiObjectProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |