|
|||||||||
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
Provides a specific JndiObject.
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 requisite property not in parent classes:
public Vector aHandlerMethod(Object sessionId, <ArgumentType> aArgument) throws Exception { <JNDIObjectClass> jndiObject = (<JNDIObjectClass>)getConnection(sessionId); .... use the jndiObject here ... releaseConnection(jndiObject); return theResult; } // end aHandlerMethod
NOTE: This provider does not yet support caching for multiple principles or sessions. If this is a requirement, please provide the lookup code directly in your jndi client. Principle passing to through the ConnectionManager hierarchy is upcoming.
Field Summary | |
protected java.lang.String |
jndiName
This should be specified in the properties for this provider |
static java.lang.String |
JNDINAME
Constant for jndiname |
protected java.lang.Object |
jndiObject
The JNDI Object that is provided by this class |
protected java.lang.String |
NON_SSL_LOGIN
|
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 | |
JndiObjectProvider()
|
|
JndiObjectProvider(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 |
applyDynamicProperties(java.util.Properties dynamicProperties)
applies dynamically in properties. |
void |
connect()
Finds and sets the JNDI Object using its own provider info |
void |
disconnect()
Set the current JNDI object to null |
protected java.lang.Object |
findJndiObject()
Get a generic Jndi object. |
java.lang.Object |
getConnection(java.lang.Object sessionId)
Returns a connection in form of a JNDI Object |
java.lang.Object |
getConnection(java.lang.Object sessionId,
int failover)
Does nothing... |
protected abstract javax.naming.Context |
getInitialContext()
|
protected java.lang.String |
getJndiName()
|
int |
hashCode()
Override Object.hashCode() so that we can differentiate copies of this provider. |
boolean |
isSame(ConnectionProvider provider)
Compares this ConnectionProvider with the specified one and returns true if their values are the same... |
protected void |
setJndiName(java.lang.String aString)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.cle.persistence.Connectable |
isConnected |
Field Detail |
protected java.lang.Object jndiObject
protected java.lang.String jndiName
public static final java.lang.String JNDINAME
protected java.lang.String NON_SSL_LOGIN
Constructor Detail |
public JndiObjectProvider()
public JndiObjectProvider(java.util.Properties properties)
Method Detail |
protected void addPropertyKeys()
addPropertyKeys
in class ConnectionProvider
public int hashCode()
hashCode
in class ConnectionProvider
Object
public boolean isSame(ConnectionProvider provider)
isSame
in class ConnectionProvider
public java.lang.Object getConnection(java.lang.Object sessionId)
getConnection
in class ConnectionProvider
public java.lang.Object getConnection(java.lang.Object sessionId, int failover)
getConnection
in class ConnectionProvider
public void connect()
public void disconnect()
protected void setJndiName(java.lang.String aString)
protected java.lang.String getJndiName()
protected abstract javax.naming.Context getInitialContext() throws javax.naming.NamingException, java.lang.Exception
protected java.lang.Object findJndiObject()
ctx.lookup(jndiName)
)public void applyDynamicProperties(java.util.Properties dynamicProperties)
applyDynamicProperties
in class ConnectionProvider
dynamicProperties
- : Properties the dynamic properties to be
used by this provider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |