oracle.clex.persistence.ifs
Class LibrarySessionProvider

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

public class LibrarySessionProvider
extends ConnectionProvider

Provides a LibrarySession object.

Attributes can automatically be set and loaded by specifying in a properties file where the provider key is set to clex.persistence.ifs.LibrarySessionProvider. The file must be titled: persistence_deploymentkey.properties, where deploymentkey is how the ConnectionManager will reference the ConnectionProvider.

Unique requisiste properties not in parents:

Example Library Session 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="ifs" class="oracle.clex.persistence.ifs.LibrarySessionProvider">
    <property name="servicename" value="aservicename"/>
    <property name="servicepassword" value="aservicepassword"/>
    <property name="persistencebase" value="oracle.demo.docdemo.persistence.ifs"/>
    <property name="failover" value=""/>
  </provider>
 </cle-providers>
 

Typical Usage in a Handler:

  public Vector aHandlerMethod(Object sessionId, <ArgumentType> aArgument)
    throws Exception
  {
    LibrarySession ifsSession = (LibrarySession)getConnection(sessionId);
    .... use the LibrarySession here ... this HOPEFULLY releases to the pool!
    releaseConnection(sessionId);

    return theResult;
  } // end aHandlerMethod
 

See Also:
Serialized Form

Field Summary
protected  oracle.ifs.beans.LibrarySession librarySession
          The single LibrarySession for this provider.
protected  java.lang.String serviceName
           
static java.lang.String SERVICENAME
          Constant for servicename
protected  java.lang.String servicePassword
           
static java.lang.String SERVICEPASSWORD
          Constant for servicepassword
 
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
LibrarySessionProvider()
           
LibrarySessionProvider(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 LibrarySession using its own provider info
 void disconnect()
          Disconnects the LibrarySession
 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 getServiceName()
           
 java.lang.String getServicePassword()
           
 int hashCode()
          Override Object.hashCode() so that we can differentiate copies of this provider.
 boolean isConnected()
          Returns the state of the connection for the Provider
 boolean isSame(ConnectionProvider provider)
          Compares this ConnectionProvider with the specified one and returns true if their values are the same...
 void releaseConnection(java.lang.Object sessionId)
          Empty Implementation Do nothing...
 void setServiceName(java.lang.String aServiceName)
           
 void setServicePassword(java.lang.String aServicePassword)
           
 
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

librarySession

protected oracle.ifs.beans.LibrarySession librarySession
The single LibrarySession for this provider. This is derived from the properties loaded for this provider.

SERVICENAME

public static final java.lang.String SERVICENAME
Constant for servicename

SERVICEPASSWORD

public static final java.lang.String SERVICEPASSWORD
Constant for servicepassword

serviceName

protected java.lang.String serviceName

servicePassword

protected java.lang.String servicePassword
Constructor Detail

LibrarySessionProvider

public LibrarySessionProvider()

LibrarySessionProvider

public LibrarySessionProvider(java.util.Properties properties)
Method Detail

addPropertyKeys

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

hashCode

public int hashCode()
Override Object.hashCode() so that we can differentiate copies of this provider. 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
See Also:
Object

isSame

public boolean isSame(ConnectionProvider provider)
Compares this ConnectionProvider with the specified one and returns true if their values are the same... false otherwise.
Overrides:
isSame in class ConnectionProvider

getConnection

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

getConnection

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

releaseConnection

public void releaseConnection(java.lang.Object sessionId)
Empty Implementation Do nothing... the librarySession is just a factory, so we don't need to.
Overrides:
releaseConnection in class ConnectionProvider

connect

public void connect()
Get the LibrarySession using its own provider info

disconnect

public void disconnect()
Disconnects the LibrarySession

isConnected

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

getServiceName

public java.lang.String getServiceName()

setServiceName

public void setServiceName(java.lang.String aServiceName)

getServicePassword

public java.lang.String getServicePassword()

setServicePassword

public void setServicePassword(java.lang.String aServicePassword)


Copyright © 2003 ORACLE Corp. All Rights Reserved.