|
|||||||||
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.toplink.ClientSessionProvider
Vital information required for TOPLink connection.
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.
Note:- The property mappingDescriptor specifies the location of the deployment XML for the TopLink project for version 9.0.3 thats places at at the root of the classpath (ie. WEB-INF/classes/DocumentRequest.xml - for the above example).
public Vector aHandlerMethod( <ArgumentType> aArgument) throws Exception { Vector result = null; ClientSession session = (ClientSession) getConnection(sessionId); * // use the customCode here ... finally { releaseConnection(); } return theResult; } // end aHandlerMethod
Field Summary | |
protected java.util.Hashtable |
connections
This is a table of TOPLinkConnections keyed by user |
protected boolean |
isRuntime
|
static java.lang.String |
ISRUNTIME
|
protected java.lang.String |
mappingDescriptor
|
static java.lang.String |
MAPPINGDESCRIPTOR
|
static int |
NUMBER_OF_TRIES
|
protected java.lang.String |
projectName
|
static java.lang.String |
PROJECTNAME
|
protected java.lang.String |
projectPackage
|
static java.lang.String |
PROJECTPACKAGE
|
protected oracle.toplink.threetier.Server |
server
|
protected boolean |
shouldLogMessages
|
static java.lang.String |
SHOULDLOGMESSAGES
|
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 | |
ClientSessionProvider(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()
Connect to the database using its own provider info The cle_providers.xml has the entries |
void |
disconnect()
Disconnect Provider from the database |
java.lang.Object |
getConnection(java.lang.Object sessionId)
Returns a ClientSession. |
java.lang.Object |
getConnection(java.lang.Object sessionId,
int failover)
Not yet implemented. |
java.lang.String |
getMappingDescriptor()
Returns the mapping descriptor |
java.lang.String |
getProjectName()
Sets the toplink project name |
java.lang.String |
getProjectPackage()
Returns the package for the toplink project |
int |
hashCode()
Override Object.hashCode() so that we can differentiate TOPLinkConnection copies in the ConnectionPool. |
boolean |
isConnected()
Returns the state of the connection for the Provider |
boolean |
isSame(ConnectionProvider provider)
Compares this ClientSessionConnection info and returns true if their values are the same... |
void |
releaseConnection(java.lang.Object sessionId)
Does nothing.. |
void |
setMappingDescriptor(java.lang.String mdesc)
Sets the mapping descriptor |
void |
setProjectName(java.lang.String aString)
Sets the toplink project name |
boolean |
shouldLogMessages()
Returns true if the messages should be log. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROJECTPACKAGE
public static final java.lang.String PROJECTNAME
public static final java.lang.String MAPPINGDESCRIPTOR
public static final java.lang.String SHOULDLOGMESSAGES
public static final java.lang.String ISRUNTIME
protected java.lang.String projectPackage
protected java.lang.String projectName
protected oracle.toplink.threetier.Server server
protected java.lang.String mappingDescriptor
protected boolean shouldLogMessages
protected boolean isRuntime
protected java.util.Hashtable connections
public static final int NUMBER_OF_TRIES
Constructor Detail |
public ClientSessionProvider(java.util.Properties properties)
Method Detail |
protected void addPropertyKeys()
addPropertyKeys
in class ConnectionProvider
public java.lang.String getMappingDescriptor()
public java.lang.String getProjectPackage()
public java.lang.String getProjectName()
public boolean shouldLogMessages()
public void setMappingDescriptor(java.lang.String mdesc)
public void setProjectName(java.lang.String aString)
public int hashCode()
hashCode
in class ConnectionProvider
oracle.cle.persistence.ConnectionProvider
Object
public boolean isSame(ConnectionProvider provider)
isSame
in class ConnectionProvider
public void connect()
public void disconnect()
public boolean isConnected()
public void releaseConnection(java.lang.Object sessionId)
disconnect
releaseConnection
in class ConnectionProvider
public java.lang.Object getConnection(java.lang.Object sessionId) throws CLEException
getConnection
in class ConnectionProvider
public java.lang.Object getConnection(java.lang.Object sessionId, int failover)
getConnection
in class ConnectionProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |