Invoked by the ApplicationPool to acquire dynamic application context
before the following ApplicationModule lifecycle events:
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 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, );
((Hashtable)env).put(Configuration.DB_PASSWORD_PROPERTY, );
return null;
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.
- Specified by:
getInfo
in interface EnvInfoProvider
Following copied from interface: oracle.jbo.common.ampool.EnvInfoProvider
- Parameters:
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.env
- a Hashtable object containing the environment that
will be passed to:
oracle.jbo.Transaction.connect(String, Properties)
oracle.jbo.server.ApplicationModuleImpl.prepareSession(Session)
- Returns:
- Unused. Retained for legacy reasons.
- See Also:
for an example implementation
of an EnvInfoProvider for a JClient.