public class RidcConnectionProvider extends Object
Constructor and Description |
---|
RidcConnectionProvider() |
Modifier and Type | Method and Description |
---|---|
protected static RidcConnection |
__internalGetConnection(oracle.adf.share.ADFContext adfContext,
String connectionName)
Lookup from the ADF Connections Context the connection with the specified
connection name and return it should it be an instance of an RIDC
Connection
|
static void |
dispose()
Dispose the RIDC connections registry object stored in the ADF
Application scope.
|
static RidcConnection |
getConnection(String connectionName)
Obtain from registry of RidcConnection singletons, the RidcConnection
with the specified name.
|
protected static void |
initializeConnection(RidcConnection conn)
Initialize the RIDC Connection.
|
static String[] |
listRidcConnections()
Lists all the RIDC connections in the current ADFContext.
|
protected static void |
setConnectionProperties(RidcConnection conn,
IdcClient client)
Set the IdcClient's protocol configuration configuration properties.
|
protected static void |
setSessionPoolProperties(RidcConnection conn,
IdcClient client)
Set the Session Pool configuration properties.
|
protected static void |
validateConnectionDefinition(RidcConnection conn)
Performs a best-effort attempt at validating the RIDC Connection object's
underlying properties.
|
public static RidcConnection getConnection(String connectionName) throws NamingException, IdcClientException
Once a named connection is obtained for the first time and initialized, any subsequent changes to that connection by way of MBean operations will not take effect until either
This method is thread-safe.
connectionName
- The name of the RIDC ADF ConnectionNamingException
IdcClientException
protected static RidcConnection __internalGetConnection(oracle.adf.share.ADFContext adfContext, String connectionName) throws NamingException
adfContext
- the ADF ContextconnectionName
- the name of the RIDC ADF ConnectionNamingException
protected static void initializeConnection(RidcConnection conn) throws IdcClientException
This involves ...
conn
- The RIDC Connection to initializeIdcClientException
protected static void setConnectionProperties(RidcConnection conn, IdcClient client)
Called from initializeConnection(), this method works through the connection's properties and invokes the appropriate setters on the IdcClient's underlying protocol-specific configuration object.
conn
- The RIDC Connection object to obtain properties fromclient
- The IdcClient instance to set properties onprotected static void setSessionPoolProperties(RidcConnection conn, IdcClient client)
Called from initializeConnection(), this method ensures session pool support if required has suitable configuration
conn
- The RIDC Connection objectclient
- The IdcClient instancepublic static void dispose()
Note
Any existing connection objects stored/held by application code must be
released. Such connection objects are not automatically refreshed, nor
are they marked dirty.
Any subsequent call to the getConnection(..) method will result in a
fresh connection with latest available properties.
public static String[] listRidcConnections() throws NamingException
NamingException
- If an error occurs listing the connections.protected static void validateConnectionDefinition(RidcConnection conn)
conn
- The RIDC Connection object to validate properties from