oracle.clex.persistence.toplink
Class TOPLink3TierConnectionProvider

java.lang.Object
  |
  +--oracle.cle.persistence.ConnectionProvider
        |
        +--oracle.clex.persistence.toplink.TOPLink3TierConnectionProvider
All Implemented Interfaces:
Connectable, java.io.Serializable

Deprecated. use ClientSessionProvider for TOPLink903 and on. Discontinue use of oracle.clex.persistence.toplink.TOPLink*.java, oracle.clex.persistence.toplink.CLEUnitOfWork.java and oracle.clex.persistence.toplink.PersistenceExceptionHandler.java

public class TOPLink3TierConnectionProvider
extends ConnectionProvider

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.

Example TOPLink 3 Tier Connection Provider in cle-providers.xml:

 <?xml version="1.0" standalone="yes"?>
 <!DOCTYPE cle-providers SYSTEM "http://xmlns.oracle.com/ias/mvc/cle-providers.dtd">
 <cle-providers>
  <provider name="personnel_toplink" class="oracle.clex.persistence.toplink.TOPLink3TierConnectionProvider">
    <property name="projectname" value="PersonnelProject"/>
    <property name="projectpackage" value="oracle.demo.personnel.persistence.toplink.mapping"/>
    <property name="projectdirectory" value="c:\\vobs\\cle\\src\\java\\oracle\\demo\\personnel\\persistence\\toplink\\mapping"/>
    <property name="key" value="=3Np1mo*Vn0L40yy990rrQlnloy019tn9KFkkxx"/>
    <property name="licensepath" value="c:\\vobs\\cle\\src\\java\\oracle\\clex\\persistence\\toplink\\"/>
    <property name="isruntime" value="true"/>
    <property name="shouldlogmessages" value="true"/>
    <property name="user" value="scott"/>
    <property name="password" value="tiger"/>
    <property name="connectionstring" value="jdbc:oracle:thin:scott/tiger@localhost:1521:orcl"/>
    <property name="drivertype" value="jdbc:oracle:thin:@"/>
    <property name="host" value="localhost"/>
    <property name="port" value="1521"/>
    <property name="sid" value="orcl1"/>
    <property name="persistencebase" value="oracle.demo.personnel.persistence.toplink"/>
    <property name="failover" value=""/>
   </provider>
 </cle-providers>
 

Typical Usage in a Handler:

  public Vector aHandlerMethod(Object sessionId, <ArgumentType> aArgument)
    throws Exception
  {
    TOPLinkConnection conn = (TOPLinkConnection)getConnection(sessionId);
    ... use the appModule here ...
    releaseConnection(sessionId);

    return theResult;
  } // end aHandlerMethod
 

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable connections
          Deprecated. This is a table of TOPLinkConnections keyed by user
protected  boolean isRuntime
          Deprecated.  
static java.lang.String ISRUNTIME
          Deprecated.  
protected  java.lang.String key
          Deprecated.  
static java.lang.String KEY
          Deprecated.  
protected  java.lang.String licensePath
          Deprecated.  
static java.lang.String LICENSEPATH
          Deprecated.  
static int NUMBER_OF_TRIES
          Deprecated.  
protected  java.lang.String projectDirectory
          Deprecated.  
static java.lang.String PROJECTDIRECTORY
          Deprecated.  
protected  java.lang.String projectName
          Deprecated.  
static java.lang.String PROJECTNAME
          Deprecated.  
protected  java.lang.String projectPackage
          Deprecated.  
static java.lang.String PROJECTPACKAGE
          Deprecated.  
protected  TOPLink.Public.ThreeTier.Server server
          Deprecated.  
protected  boolean shouldLogMessages
          Deprecated.  
static java.lang.String SHOULDLOGMESSAGES
          Deprecated.  
 
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
TOPLink3TierConnectionProvider(java.util.Properties properties)
          Deprecated.  
 
Method Summary
protected  void addPropertyKeys()
          Deprecated. Each subclass should overload or override this method to include all the properties that it will use.
 void connect()
          Deprecated. Connect to the database using its own provider info
 void disconnect()
          Deprecated. Disconnect Provider from the database
 java.lang.Object getConnection(java.lang.Object sessionId)
          Deprecated. Returns a connection
 java.lang.Object getConnection(java.lang.Object sessionId, int failover)
          Deprecated. Does nothing..
 java.lang.String getKey()
          Deprecated.  
 java.lang.String getLicensePath()
          Deprecated.  
 java.lang.String getProjectDirectory()
          Deprecated.  
 java.lang.String getProjectName()
          Deprecated.  
 java.lang.String getProjectPackage()
          Deprecated.  
 int hashCode()
          Deprecated. Override Object.hashCode() so that we can differentiate TOPLinkConnection copies in the ConnectionPool.
 boolean isConnected()
          Deprecated. Returns the state of the connection for the Provider
 boolean isRuntime()
          Deprecated.  
 boolean isSame(ConnectionProvider provider)
          Deprecated. Compares this TOPLinkConnection info and returns true if their values are the same...
 void releaseConnection(java.lang.Object sessionId)
          Deprecated. Dummy Implementation
 void setIsRuntime(boolean aBoolean)
          Deprecated.  
 void setKey(java.lang.String aString)
          Deprecated.  
 void setLicensePath(java.lang.String aString)
          Deprecated.  
 void setProjectDirectory(java.lang.String aString)
          Deprecated.  
 void setProjectName(java.lang.String aString)
          Deprecated.  
 boolean shouldLogMessages()
          Deprecated.  
 
Methods inherited from class oracle.cle.persistence.ConnectionProvider
addPropertyKey, applyDynamicProperties, clone, compareDynamicProperties, compareProperty, equals, getConnection, getConnection, getConnection, getConnection, getConnection, getConnection, getConnectionString, getDefaultProperties, getDeploymentKey, getDriverType, getEncryptionType, getFailOver, getHost, getPassword, getPassword, getPersistenceBase, getPort, getProperty, getPropertyKeys, getScope, getSid, getUnspecifiedKeys, getUserName, issueWarnings, releaseAllConnections, releaseAllConnections, releaseConnection, releaseConnection, releaseConnection, releaseRequestScopedConnections, releaseRequestScopedConnections, removePropertyKey, setConnectionString, setDefaultProperties, setDeploymentKey, setEncryptionType, setHost, setPassword, setPersistenceBase, setPort, setScope, setSid, setUserName, warn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECTPACKAGE

public static final java.lang.String PROJECTPACKAGE
Deprecated. 

PROJECTNAME

public static final java.lang.String PROJECTNAME
Deprecated. 

PROJECTDIRECTORY

public static final java.lang.String PROJECTDIRECTORY
Deprecated. 

LICENSEPATH

public static final java.lang.String LICENSEPATH
Deprecated. 

KEY

public static final java.lang.String KEY
Deprecated. 

ISRUNTIME

public static final java.lang.String ISRUNTIME
Deprecated. 

SHOULDLOGMESSAGES

public static final java.lang.String SHOULDLOGMESSAGES
Deprecated. 

projectPackage

protected java.lang.String projectPackage
Deprecated. 

projectName

protected java.lang.String projectName
Deprecated. 

licensePath

protected java.lang.String licensePath
Deprecated. 

key

protected java.lang.String key
Deprecated. 

projectDirectory

protected java.lang.String projectDirectory
Deprecated. 

isRuntime

protected boolean isRuntime
Deprecated. 

shouldLogMessages

protected boolean shouldLogMessages
Deprecated. 

server

protected TOPLink.Public.ThreeTier.Server server
Deprecated. 

connections

protected java.util.Hashtable connections
Deprecated. 
This is a table of TOPLinkConnections keyed by user

NUMBER_OF_TRIES

public static final int NUMBER_OF_TRIES
Deprecated. 
Constructor Detail

TOPLink3TierConnectionProvider

public TOPLink3TierConnectionProvider(java.util.Properties properties)
Deprecated. 
Method Detail

addPropertyKeys

protected void addPropertyKeys()
Deprecated. 
Each subclass should overload or override this method to include all the properties that it will use.
Overrides:
addPropertyKeys in class ConnectionProvider

getProjectPackage

public java.lang.String getProjectPackage()
Deprecated. 

getProjectDirectory

public java.lang.String getProjectDirectory()
Deprecated. 

getProjectName

public java.lang.String getProjectName()
Deprecated. 

getLicensePath

public java.lang.String getLicensePath()
Deprecated. 

getKey

public java.lang.String getKey()
Deprecated. 

isRuntime

public boolean isRuntime()
Deprecated. 

shouldLogMessages

public boolean shouldLogMessages()
Deprecated. 

setProjectName

public void setProjectName(java.lang.String aString)
Deprecated. 

setProjectDirectory

public void setProjectDirectory(java.lang.String aString)
Deprecated. 

setLicensePath

public void setLicensePath(java.lang.String aString)
Deprecated. 

setKey

public void setKey(java.lang.String aString)
Deprecated. 

setIsRuntime

public void setIsRuntime(boolean aBoolean)
Deprecated. 

hashCode

public int hashCode()
Deprecated. 
Override Object.hashCode() so that we can differentiate TOPLinkConnection copies in the ConnectionPool. Uses the String class' hashCode method because the mere mortals who wrote this method didn't want to be bothered by writing it
Overrides:
hashCode in class ConnectionProvider
Following copied from class: oracle.cle.persistence.ConnectionProvider
See Also:
Object

isSame

public boolean isSame(ConnectionProvider provider)
Deprecated. 
Compares this TOPLinkConnection info and returns true if their values are the same... false otherwise. Returns false when projectName is different
Overrides:
isSame in class ConnectionProvider

connect

public void connect()
Deprecated. 
Connect to the database using its own provider info

disconnect

public void disconnect()
Deprecated. 
Disconnect Provider from the database

isConnected

public boolean isConnected()
Deprecated. 
Returns the state of the connection for the Provider

getConnection

public java.lang.Object getConnection(java.lang.Object sessionId)
                               throws CLEException
Deprecated. 
Returns a connection
Overrides:
getConnection in class ConnectionProvider

getConnection

public java.lang.Object getConnection(java.lang.Object sessionId,
                                      int failover)
Deprecated. 
Does nothing.. Returns null
Overrides:
getConnection in class ConnectionProvider

releaseConnection

public void releaseConnection(java.lang.Object sessionId)
Deprecated. 
Dummy Implementation
Overrides:
releaseConnection in class ConnectionProvider


Copyright © 2003 ORACLE Corp. All Rights Reserved.