Business Components

oracle.jbo.common.ampool
Class ApplicationPoolImpl

java.lang.Object
  |
  +--oracle.jbo.common.ampool.ApplicationPoolImpl

public class ApplicationPoolImpl
extends java.lang.Object
implements ApplicationPool

This class provides the default implementation of the ApplicationPool interface. View definition of ApplicationPool View Implementation of ApplicationPoolImpl


Constructor Summary
ApplicationPoolImpl()
          Constructor
 
Method Summary
 void checkin(ApplicationModule instance)
          Checks in an application instance that had previously been checked out.
 ApplicationModule checkout()
          Checks out an application instance from the pool.
 ApplicationModule createNewInstance()
          This create a new instance of an application without looking for an available instance in the pool.
 java.lang.String getApplicationModuleClass()
          Return the class name of the application modules being managed by the pool.
 java.lang.String getConnectString()
          Return the connect string of the application modules being managed by the application pool.
 java.util.Hashtable getEnvironment()
          Returns the Hashtable that was used to initialie the Contect for the application modules.
 ApplicationModule getInstance(int nIndex)
          Returns the application instance represented by the instance index.
 int getInstanceCount()
          Returns the number of instances that the Application Pool has created.
 java.lang.String getPoolName()
          Returns the pool's name.
 java.util.Hashtable getUserData()
          returns the User Data hashtable.
 void initialize(java.lang.String sPoolName, java.lang.String sApplicationModule, java.lang.String sConnectString, java.util.Hashtable env)
          This initializes the ApplicationPool.
 boolean isAvailable(ApplicationModule instance)
          Returns true if the application module is available
 void releaseInstances()
          Causes the pool to release all the application isntances that have been created so far.
 void setAvailable(ApplicationModule instance, boolean bSet)
          Sets the instance to available or not
 void setUserData(java.util.Hashtable data)
          Replaces the userData with the new Hashtable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationPoolImpl

public ApplicationPoolImpl()
Constructor
Method Detail

initialize

public void initialize(java.lang.String sPoolName,
                       java.lang.String sApplicationModule,
                       java.lang.String sConnectString,
                       java.util.Hashtable env)
                throws java.lang.Exception
Description copied from interface: ApplicationPool
This initializes the ApplicationPool. The Pool name should be unique with respect to any other pools. An exception will be thrown on any errors such as duplicate pool name or mismatched information within the connectInfo parameter. Take a close look at the ConnectInfo documentation since it controls the key information for initializing the application pool.
Specified by:
initialize in interface ApplicationPool

getApplicationModuleClass

public java.lang.String getApplicationModuleClass()
Description copied from interface: ApplicationPool
Return the class name of the application modules being managed by the pool.
Specified by:
getApplicationModuleClass in interface ApplicationPool

getConnectString

public java.lang.String getConnectString()
Description copied from interface: ApplicationPool
Return the connect string of the application modules being managed by the application pool.
Specified by:
getConnectString in interface ApplicationPool

getEnvironment

public java.util.Hashtable getEnvironment()
Description copied from interface: ApplicationPool
Returns the Hashtable that was used to initialie the Contect for the application modules.
Specified by:
getEnvironment in interface ApplicationPool

checkin

public void checkin(ApplicationModule instance)
Description copied from interface: ApplicationPool
Checks in an application instance that had previously been checked out. This makes the application instance avalable for subsequent checkout requests from this pool.
Specified by:
checkin in interface ApplicationPool

isAvailable

public boolean isAvailable(ApplicationModule instance)
Description copied from interface: ApplicationPool
Returns true if the application module is available
Specified by:
isAvailable in interface ApplicationPool

setAvailable

public void setAvailable(ApplicationModule instance,
                         boolean bSet)
Description copied from interface: ApplicationPool
Sets the instance to available or not
Specified by:
setAvailable in interface ApplicationPool

createNewInstance

public ApplicationModule createNewInstance()
Description copied from interface: ApplicationPool
This create a new instance of an application without looking for an available instance in the pool. This method should not be called directly, you should call checkout() .
Specified by:
createNewInstance in interface ApplicationPool

checkout

public ApplicationModule checkout()
Description copied from interface: ApplicationPool
Checks out an application instance from the pool. If the pool doesn't have any available instances, it will create a new instance and return it to the caller.
Specified by:
checkout in interface ApplicationPool

releaseInstances

public void releaseInstances()
Description copied from interface: ApplicationPool
Causes the pool to release all the application isntances that have been created so far. The remove() method is called on the Application Modules being represented by the application instance class
Specified by:
releaseInstances in interface ApplicationPool

getInstanceCount

public int getInstanceCount()
Description copied from interface: ApplicationPool
Returns the number of instances that the Application Pool has created.
Specified by:
getInstanceCount in interface ApplicationPool

getInstance

public ApplicationModule getInstance(int nIndex)
Description copied from interface: ApplicationPool
Returns the application instance represented by the instance index.
Specified by:
getInstance in interface ApplicationPool

getPoolName

public java.lang.String getPoolName()
Description copied from interface: ApplicationPool
Returns the pool's name.
Specified by:
getPoolName in interface ApplicationPool

getUserData

public java.util.Hashtable getUserData()
returns the User Data hashtable. This is a generic container for any settings the user would like to associate with this application instance.
Specified by:
getUserData in interface ApplicationPool

setUserData

public void setUserData(java.util.Hashtable data)
Replaces the userData with the new Hashtable.
Specified by:
setUserData in interface ApplicationPool

Business Components