|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cle.persistence.ConnectionProvider
Vital information required for connections.
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.
Most providers require the following properties to be specified
in either the cle-providers.xml file or a
persistence_deploymentkey.properties
(the properties file method is now deprecated in favor of the
cle-providers.xml file):
See the javadocs for the individual ConnectionProvider implementations for concrete examples of properties needed.
Field Summary | |
static java.lang.String |
BASE64
Constant for specifying BASE64 encryption password encryption. |
protected java.lang.Object |
connection
|
protected java.lang.String |
connectionString
|
static java.lang.String |
CONNECTIONSTRING
|
protected java.util.Properties |
defaultProperties
|
protected java.lang.String |
deploymentKey
|
protected java.lang.String |
driverType
|
static java.lang.String |
DRIVERTYPE
|
protected java.lang.String |
encryptionType
|
static java.lang.String |
ENCRYPTIONTYPE
|
protected java.lang.String |
failover
|
static java.lang.String |
FAILOVER
|
protected java.lang.String |
host
|
static java.lang.String |
HOST
|
static java.lang.String |
NO_SCOPE
|
static java.lang.String |
NONE
Constant for specifying NONE encryption password encryption. |
protected java.lang.String |
password
|
static java.lang.String |
PASSWORD
|
protected java.lang.String |
persistenceBase
|
static java.lang.String |
PERSISTENCEBASE
|
protected java.lang.String |
port
|
static java.lang.String |
PORT
|
protected java.util.Collection |
releasedConnectionIds
This map contains all the connection ids that can be released at the end of the request. |
static java.lang.String |
REQUEST_SCOPE
|
protected java.lang.String |
scope
Scope defines when a connection is released. |
static java.lang.String |
SCOPE
|
static java.lang.String |
SESSION_SCOPE
|
protected java.util.Map |
sessionConnectionIds
This map contains the connection ids that belong to a particular session id where connectionId != sessionId. |
protected java.lang.String |
sid
|
static java.lang.String |
SID
|
static java.lang.String |
USER
|
protected java.lang.String |
userName
|
Constructor Summary | |
ConnectionProvider()
Default Constructor for generic Databases |
|
ConnectionProvider(java.util.Properties properties)
Constructor for generic Databases |
Method Summary | |
protected void |
addPropertyKey(java.lang.String key)
|
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 passed in properties. |
ConnectionProvider |
clone(java.util.Properties dynamicProperties)
This method returns a Provider clone with dynamic properties used. |
boolean |
compareDynamicProperties(java.util.Properties dynamicProperties)
compares dynamically passed in properties with the ones allready in place. |
protected boolean |
compareProperty(java.util.Properties connectionProperties,
java.lang.String property)
A convenience method for comparing a property. |
boolean |
equals(java.lang.Object anObject)
Override Object.equals() so that we can differentiate Connection copies in the ConnectionPool. |
java.lang.Object |
getConnection()
Uses the sessionId returned from CLEUtil.getSessionId() |
java.lang.Object |
getConnection(int i)
Uses the sessionId returned from CLEUtil.getSessionId() |
abstract java.lang.Object |
getConnection(java.lang.Object connectionId)
This method gets a connection from a specific connection provider. |
abstract java.lang.Object |
getConnection(java.lang.Object connectionId,
int i)
This method gets a connection from a specific connection provider. |
java.lang.Object |
getConnection(java.lang.Object sessionId,
java.lang.String connectionId)
Use this method to get a connection. |
java.lang.Object |
getConnection(java.lang.Object sessionId,
java.lang.String connectionId,
int i)
Use this method if you want to get a second connection of the same type. |
java.lang.Object |
getConnection(java.lang.String connectionId)
Use this method to get a connection. |
java.lang.Object |
getConnection(java.lang.String connectionId,
int i)
Use this method if you want to get a second connection of the same type. |
java.lang.String |
getConnectionString()
Returns the connection string for this provider. |
java.util.Properties |
getDefaultProperties()
|
java.lang.String |
getDeploymentKey()
|
java.lang.String |
getDriverType()
|
java.lang.String |
getEncryptionType()
Current option are: 'BASE64' and 'NONE'. |
java.lang.String |
getFailOver()
|
java.lang.String |
getHost()
|
java.lang.String |
getPassword()
Returns the decrypted password property. |
java.lang.String |
getPassword(boolean encrypted)
Returns the encrypted password property if parameter is true... |
java.lang.String |
getPersistenceBase()
|
java.lang.String |
getPort()
|
protected java.lang.String |
getProperty(java.util.Properties connectionProperties,
java.lang.String property)
A convenience method for getting a property. |
java.util.Set |
getPropertyKeys()
|
java.lang.String |
getScope()
|
java.lang.String |
getSid()
|
protected java.util.Set |
getUnspecifiedKeys()
|
java.lang.String |
getUserName()
|
int |
hashCode()
Override Object.hashCode() so that we can differentiate Connection copies in the ConnectionPool. |
boolean |
isSame(ConnectionProvider aConnectionProvider)
Compares this connection info and returns true if their values are the same... |
protected void |
issueWarnings()
Warns the user of missing required property keys. |
void |
releaseAllConnections()
This method releases all connections that were retrieved during a session. |
void |
releaseAllConnections(java.lang.Object sessionId)
This method releases all connections that were retrieved during a session. |
void |
releaseConnection()
Release the Connection associated with the sessionId. |
abstract void |
releaseConnection(java.lang.Object connectionId)
Release the Connection associated with the sessionId. |
void |
releaseConnection(java.lang.Object sessionId,
java.lang.String connectionId)
This method releases a connection or marks a connection so that it can be released at the end of a request. |
void |
releaseConnection(java.lang.String connectionId)
This method releases a connection or marks a connection so that it can be released at the end of a request. |
void |
releaseRequestScopedConnections()
This method releases all request scoped connections that were released during the request. |
void |
releaseRequestScopedConnections(java.lang.Object sessionId)
This method releases all request scoped connections that were released during the request. |
protected void |
removePropertyKey(java.lang.String key)
|
void |
setConnectionString(java.lang.String aString)
|
void |
setDefaultProperties(java.util.Properties newDefaultProperties)
|
protected void |
setDeploymentKey(java.lang.String deploymentKey)
|
void |
setEncryptionType(java.lang.String aString)
|
void |
setHost(java.lang.String aString)
|
void |
setPassword(java.lang.String aString)
|
void |
setPersistenceBase(java.lang.String aString)
|
void |
setPort(java.lang.String anInt)
|
void |
setScope(java.lang.String aString)
|
void |
setSid(java.lang.String aString)
|
void |
setUserName(java.lang.String aString)
|
protected void |
warn(java.lang.String warning)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.cle.persistence.Connectable |
connect, disconnect, isConnected |
Field Detail |
public static final java.lang.String USER
public static final java.lang.String PASSWORD
public static final java.lang.String HOST
public static final java.lang.String PORT
public static final java.lang.String FAILOVER
public static final java.lang.String SID
public static final java.lang.String DRIVERTYPE
public static final java.lang.String CONNECTIONSTRING
public static final java.lang.String PERSISTENCEBASE
public static final java.lang.String ENCRYPTIONTYPE
public static final java.lang.String SCOPE
public static final java.lang.String REQUEST_SCOPE
public static final java.lang.String SESSION_SCOPE
public static final java.lang.String NO_SCOPE
protected java.util.Properties defaultProperties
protected java.lang.String userName
protected java.lang.String password
protected java.lang.String host
protected java.lang.String port
protected java.lang.String failover
protected java.lang.String sid
protected java.lang.String driverType
protected java.lang.String connectionString
protected java.lang.String persistenceBase
protected java.lang.String encryptionType
protected java.lang.String scope
protected java.lang.Object connection
protected java.lang.String deploymentKey
public static final java.lang.String BASE64
public static final java.lang.String NONE
protected java.util.Map sessionConnectionIds
protected java.util.Collection releasedConnectionIds
Constructor Detail |
public ConnectionProvider()
public ConnectionProvider(java.util.Properties properties)
Method Detail |
protected void addPropertyKeys()
public java.util.Set getPropertyKeys()
protected void addPropertyKey(java.lang.String key)
protected void removePropertyKey(java.lang.String key)
protected java.util.Set getUnspecifiedKeys()
protected void issueWarnings()
protected void warn(java.lang.String warning)
public void applyDynamicProperties(java.util.Properties dynamicProperties)
dynamicProperties
- : Properties the dynamic properties to be
used by this providerpublic boolean compareDynamicProperties(java.util.Properties dynamicProperties)
dynamicProperties
- : Properties the dynamic properties to be
comparedpublic boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
Object
public int hashCode()
hashCode
in class java.lang.Object
Object
protected java.lang.String getProperty(java.util.Properties connectionProperties, java.lang.String property)
protected boolean compareProperty(java.util.Properties connectionProperties, java.lang.String property)
connectionProperties
- : Properties the properties to be comparedproperty
- : String the name of the property entry to be comparedpublic boolean isSame(ConnectionProvider aConnectionProvider)
public java.lang.String getDeploymentKey()
protected void setDeploymentKey(java.lang.String deploymentKey)
public java.lang.String getUserName()
public java.lang.String getEncryptionType()
public java.lang.String getPassword()
public java.lang.String getPassword(boolean encrypted)
public java.lang.String getHost()
public java.lang.String getPort()
public java.lang.String getSid()
public java.lang.String getScope()
public java.lang.String getDriverType()
public java.lang.String getFailOver()
public void setUserName(java.lang.String aString)
public void setEncryptionType(java.lang.String aString)
public java.lang.String getConnectionString()
NOTE: If an encrypted password matching the one returned from getPassword(true) lies anywhere in this String, then it will be replaced by the cleartext version of the password and returned as a cleartext connectionstring.
public void setConnectionString(java.lang.String aString)
public java.lang.String getPersistenceBase()
public void setPersistenceBase(java.lang.String aString)
public void setPassword(java.lang.String aString)
public void setHost(java.lang.String aString)
public void setPort(java.lang.String anInt)
public void setSid(java.lang.String aString)
public void setScope(java.lang.String aString)
public java.lang.Object getConnection(java.lang.Object sessionId, java.lang.String connectionId) throws java.lang.Exception
public java.lang.Object getConnection(java.lang.String connectionId) throws java.lang.Exception
public java.lang.Object getConnection(java.lang.Object sessionId, java.lang.String connectionId, int i) throws java.lang.Exception
public java.lang.Object getConnection(java.lang.String connectionId, int i) throws java.lang.Exception
public abstract java.lang.Object getConnection(java.lang.Object connectionId) throws java.lang.Exception
public java.lang.Object getConnection() throws java.lang.Exception
public abstract java.lang.Object getConnection(java.lang.Object connectionId, int i) throws java.lang.Exception
public java.lang.Object getConnection(int i) throws java.lang.Exception
failover
- public abstract void releaseConnection(java.lang.Object connectionId)
public void releaseConnection()
public void releaseRequestScopedConnections(java.lang.Object sessionId)
public void releaseRequestScopedConnections()
public void releaseAllConnections(java.lang.Object sessionId)
public void releaseAllConnections()
public void releaseConnection(java.lang.Object sessionId, java.lang.String connectionId)
public void releaseConnection(java.lang.String connectionId)
public java.util.Properties getDefaultProperties()
public void setDefaultProperties(java.util.Properties newDefaultProperties)
public ConnectionProvider clone(java.util.Properties dynamicProperties) throws CLEException
dynamicProperties
- : Properties the dynamicProperties
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |