|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jbo.common.ampool.OCIEnvInfoProvider
May be used to specify OCI proxy authentication properties to an <@link oracle.jbo.server.OCIConnectionPoolManagerImpl} instance.
{@link oracle.jbo.http.OCISessionCookieFactory}
Constructor Summary | |
OCIEnvInfoProvider(java.lang.String ociUserName,
java.lang.String ociPassword,
java.lang.String proxyUserName,
java.lang.String proxyPassword)
|
Method Summary | |
java.lang.Object |
getInfo(java.lang.String info,
java.lang.Object connEnvironment)
Invoked by the ApplicationPool to acquire dynamic application context before the following ApplicationModule lifecycle events: |
int |
getNumOfRetries()
Returns the number times that the default connection strategy should attempt to create/connect and application module instance before failing. |
protected void |
initializeProxyUserProperties(java.util.Properties props)
|
void |
modifyInitialContext(java.lang.Object p0)
Invoked when the application pool is creating a new application module instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OCIEnvInfoProvider(java.lang.String ociUserName, java.lang.String ociPassword, java.lang.String proxyUserName, java.lang.String proxyPassword)
Method Detail |
public java.lang.Object getInfo(java.lang.String info, java.lang.Object connEnvironment)
EnvInfoProvider
1. An ApplicationModule instance is created
2. An ApplicationModule instance is connected
3. An ApplicationModule instance is reused by an ApplicationPool
session which is differnt than the session which had previously
used it. Please see SessionCookie
for more information about ApplicationPool sessions.
An EnvInfoProvider implementation may respond to the request by providing session context for the ApplicationModule instance in the environment Hashtable which is passed to getInfo.
getInfo is always invoked with a Hashtable instance though
it may also be invoked with a java.util.Properties (extends
Hashtable) in some scenarios. Any session context that is specified
by getInfo will also be available in the BC4J middle tier via
Session
and during invocation of {@link oracle.jbo.server.ApplicationModuleImpl#prepareSession(Session).
getInfo may also be used to dynamically specify JDBC credentials.
For example, the following code snippet may be used to dynamically
specify the JDBC credentials for the current ApplicationModule session
(please see the article at http://otn.oracle.com/products/jdev/howtos/bc4j/howto_dynamic_jdbc.html for more information about dynamically specifying
JDBC credentials to BC4J):
((Hashtable)env).put(Configuration.DB_USERNAME_PROPERTY,
Finally, getInfo may also be invoked multiple times during a connect attempt, if previous connect attempts have failed. This is intended to give the EnvInfoProvider an opportunity to correct the dynamic JDBC credentials before ultimately failing with an exception. The connection exception, if one occurred, is available to the EnvInfoProvider via the context with the DefaultConnectionStrategy.LAST_EXCEPTION key.
getInfo
in interface EnvInfoProvider
info
- Unused. Retained for legacy reasons. Please note that
before connecting the pooling framework may invoke getInfo multiple
times with the following values for the info parameter:
1. Configuration.DB_USERNAME_PROPERTY
2. Configuration.DB_PASSWORD_PROPERTY
3. null
Though it is only necessary to actually respond to the null
request.connEnvironment
- a Hashtable object containing the environment that
will be passed to:
oracle.jbo.Transaction.connect(String, Properties)
oracle.jbo.server.ApplicationModuleImpl.prepareSession(Session)
for an example implementation
of an EnvInfoProvider for a JClient.
protected void initializeProxyUserProperties(java.util.Properties props)
public void modifyInitialContext(java.lang.Object p0)
EnvInfoProvider
modifyInitialContext
in interface EnvInfoProvider
public int getNumOfRetries()
EnvInfoProvider
getNumOfRetries
in interface EnvInfoProvider
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.