public class IMSManagedConnectionFactory
extends com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
The following code fragment shows how to use IMSManagedConnectionFactory
to obtain a Connection object.
Connection connection = null;
IMSManagedConnectionFactory mcf = new IMSManagedConnectionFactory();
// Set connection properties
mcf.setUser("myUserid");
mcf.setPassword("myPassword");
mcf.setDatastoreName("IMS1");
mcf.setDatastoreServer("ec0123.my.host.com");
mcf.setPortNumber(5555);
mcf.setDatabaseName("class://testcases.jdbo.BMP255DatabaseView");
mcf.setSSLConnection(false);
mcf.setDriverType(IMSManagedConnectionFactory.DRIVER_TYPE_4);
mcf.setLoginTimeout(10);
// Create CCI Connection
private ConnectionFactoryImpl cf = (ConnectionFactoryImpl) mcf.createConnectionFactory();
connection = cf.getConnection();
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DRIVER_TYPE_2 |
static java.lang.String |
DRIVER_TYPE_2_CTX |
static java.lang.String |
DRIVER_TYPE_4
Constant indicating the driver is pure Java and implements the network protocol for the data source.
|
| Constructor and Description |
|---|
IMSManagedConnectionFactory() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
createConnectionFactory()
Creates a
ConnectionFactory instance. |
java.lang.String |
getCurrentSchema()
Retrieves the current schema.
|
java.lang.String |
getDatabaseName()
Retrieves the name of the target IMS database.
|
java.lang.String |
getDatastoreName()
Retrieves name of the IMS datastore.
|
java.lang.String |
getDatastoreServer()
Retrieves the name or IP address of your datastore server (IMS Connect).
|
java.lang.String |
getDriverType()
Retrieves the database connectivity method.
|
boolean |
getExpandArrayResultSet()
Returns the option to expand or not expand the ResultSet of a column with data
type ARRAY.
|
java.lang.Integer |
getFetchSize()
Retrieves the fetch size.
|
java.lang.String |
getInitStatusGroup()
Retrieves the initStatusGroup.
|
java.lang.Boolean |
getJDBCConnection()
Retrieves the JDBC connectivity type.
|
java.lang.String |
getKeyStoreType()
Retrieves the Key Store Type
|
java.lang.Boolean |
getLLField()
Retrieves the llField.
|
java.io.PrintWriter |
getLogWriter()
Retrieves the log writer for this
ManagedConnectionFactory object. |
java.lang.Integer |
getMaxRows()
Retrieves the max rows.
|
java.lang.String |
getMetadataURL()
Deprecated.
|
java.lang.String |
getPassword()
Retrieves the user password.
|
java.lang.Integer |
getPortNumber()
Retrieves the port number.
|
boolean |
getRemoveInvalidCaseFields()
Returns the option to whether to remove the map case fields that don't satisfy the DEPENDINGON
field condition in the WHERE clause from the column's list in the result set.
|
java.lang.String |
getSecureSocketProtocol()
Retrieves the Secure Socket Protocol
|
boolean |
getSsaOptimization()
Returns the option to whether to optimize the SSA or not
When set to true the SSA will be optimized to a fully qualified key if subfields of that key are provided. |
java.lang.Boolean |
getSSLConnection()
Retrieves the SSL connectivity.
|
java.lang.String |
getSslKeyMgrAlgorithm()
Retrieves the SSL Key Store Manager Algorithm
|
java.lang.String |
getSslKeyStoreLocation()
Retrieves the SSL Key Store Location
|
java.lang.String |
getSslKeyStorePassword()
Retrieves the SSL Key Store Password
|
java.lang.String |
getSslTrustMgrAlgorithm()
Retrieves the SSL Trust Store Manager Algorithm
|
java.lang.String |
getSslTrustStoreLocation()
Retrieves the SSL Trust Store Location
|
java.lang.String |
getSslTrustStorePassword()
Retrieves the SSL Trust Store Password
|
java.lang.String |
getUser()
Retrieves the user name.
|
void |
setCurrentSchema(java.lang.String currentSchema)
Sets the current schema.
|
void |
setDatabaseName(java.lang.String databaseName)
Sets the name of the target IMS database to be accessed.
|
void |
setDatastoreName(java.lang.String datastoreName)
Sets the name of the IMS datastore to access.
|
void |
setDatastoreServer(java.lang.String datastoreServer)
Sets the name or IP address of the datastore server (IMS Connect).
|
void |
setDriverType(java.lang.String driverType)
Sets the type of driver to use to connect to the database.
|
void |
setExpandArrayResultSet(boolean expandArrayResultSet)
Sets the option to expand or not expand the ResultSet of a column with data
type ARRAY.
|
void |
setFetchSize(int fetchsize)
Sets the fetch size.
|
void |
setFlattenTables(boolean flattenTables) |
void |
setInitStatusGroup(java.lang.String initStatusGroup)
When a connection is made and the PSB allocated, this property will indicate that the driver should automatically
issue an INIT STATUS GROUPA or INIT STATUS GROUPB if a value of 'A' or 'B' is provided.
|
void |
setJDBCConnection(boolean isJDBC)
Sets the JDBC connectivity which indicates whether or not the connection the
application receives is
java.sql.Connection versus a javax.resource.cci.Connection. |
void |
setKeyStoreType(java.lang.String keyStoreType)
Sets the Key Store Type
|
void |
setLLField(boolean llField)
Sets the llField property.
|
void |
setLoginTimeout(int loginTimeout)
Sets the loginTimeout.
|
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this
ManagedConnectionFactory object to the given
java.io.PrintWriter object. |
void |
setMaxRows(int maxRows)
Sets the max rows.
|
void |
setMetadataURL(java.lang.String metadataURL)
Deprecated.
|
void |
setPassword(java.lang.String password)
Sets the user password.
|
void |
setPoolConnections(boolean poolConnections)
Enables connection pooling in a two-tier non-managed environment.
|
void |
setPortNumber(int portNumber)
Sets the port number to be used to communicate with IMS Connect.
|
void |
setPreloadUserTypeConverters(boolean preloadUserTypeConverters) |
void |
setRemoveInvalidCaseFields(boolean removeInvalidCaseFields)
Sets the option to whether to remove the map case fields that don't satisfy the DEPENDINGON
field condition in the WHERE clause from the column's list in the result set.
|
void |
setSecureSocketProtocol(java.lang.String secureSocketProtocol)
Sets the Secure Socket Protocol
|
void |
setSignedCompare(boolean signedCompare) |
void |
setSsaOptimization(boolean ssaOptimization)
Sets the option to whether to optimize the SSA or not
When set to true the SSA will be optimized to a fully qualified key if subfields of that key are provided. |
void |
setSSLConnection(boolean sslConnection)
Sets SSL encryption on or off.
|
void |
setSSLKeyMgrAlgorithm(java.lang.String sslKeyMgrAlgorithm)
Sets the SSL Key Store Manager Algorithm
|
void |
setSSLKeyStoreLocation(java.lang.String sslKeyStoreLocation)
Sets the SSL Key Store Location
|
void |
setSSLKeyStorePassword(java.lang.String sslKeyStorePassword)
Sets the SSL Key Store Password
|
void |
setSSLTrustMgrAlgorithm(java.lang.String sslTrustMgrAlgorithm)
Sets the SSL Trust Store Manager Algorithm
|
void |
setSSLTrustStoreLocation(java.lang.String sslTrustStoreLocation)
Sets the SSL Trust Store Location
|
void |
setSSLTrustStorePassword(java.lang.String sslTrustStorePassword)
Sets the SSL Trust Store Password
|
void |
setTreatInvalidDecimalAsNull(boolean treatInvalidDecimalAsNull) |
void |
setUser(java.lang.String user)
Sets the user name
|
createConnectionFactory, createManagedConnection, equals, getApplicationName, getConnectionManager, getFlattenTables, getInvalidConnections, getLoginTimeout, getReturnResultOnStatusCodeGE, getRRSTransactional, getSignedCompare, getThreadIdentitySupport, getThreadSecurity, getTreatIncompleteFieldAsNull, getTreatInvalidDecimalAsNull, getUtclibpaths, hashCode, isManagedServer, isRRSLocalOption, matchManagedConnections, setApplicationName, setFetchSize, setFlattenTables, setLLField, setLoginTimeout, setMaxRows, setPortNumber, setReturnResultOnStatusCodeGE, setSignedCompare, setSSLConnection, setTreatIncompleteFieldAsNull, setTreatInvalidDecimalAsNull, setUtcLibPathspublic static final java.lang.String DRIVER_TYPE_4
public static final java.lang.String DRIVER_TYPE_2
public static final java.lang.String DRIVER_TYPE_2_CTX
public java.lang.Object createConnectionFactory()
throws javax.resource.ResourceException
ConnectionFactory instance. The ConnectionFactory instance
is initialized with a default ConnectionManager object provided by the resource adapter.createConnectionFactory in interface javax.resource.spi.ManagedConnectionFactorycreateConnectionFactory in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplObject that implements the ConnectionFactory interfacejavax.resource.ResourceException - if an error occurs during processingpublic void setMetadataURL(java.lang.String metadataURL)
setDatabaseName(String)setMetadataURL in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplmetadataURL - metadata urlpublic void setDatabaseName(java.lang.String databaseName)
setDatabaseName in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpldatabaseName - database namepublic void setDatastoreName(java.lang.String datastoreName)
setDatastoreName in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpldatastoreName - IMS datastore namepublic void setDatastoreServer(java.lang.String datastoreServer)
setDatastoreServer in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpldatastoreServer - name or IP address of the datastore server (IMS Connect)public void setPortNumber(int portNumber)
By default, the port number is 8888.
portNumber - port numberpublic void setLoginTimeout(int loginTimeout)
By default, the value is 0, which means the driver will wait indefinitely for a socket connection creation or server response.
loginTimeout - public void setDriverType(java.lang.String driverType)
setDriverType in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpldriverType - Only 4 is currently supported.public void setSSLConnection(boolean sslConnection)
sslConnection - Set to true to turn SSL encryption on.public void setSSLTrustStoreLocation(java.lang.String sslTrustStoreLocation)
setSSLTrustStoreLocation in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslTrustStoreLocation - The SSL Trust Store Locationpublic void setSSLTrustStorePassword(java.lang.String sslTrustStorePassword)
setSSLTrustStorePassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslTrustStorePassword - The SSL Trust Store Passwordpublic void setSSLTrustMgrAlgorithm(java.lang.String sslTrustMgrAlgorithm)
setSSLTrustMgrAlgorithm in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslTrustMgrAlgorithm - The SSL Trust Store Manager Algorithmpublic void setSSLKeyStoreLocation(java.lang.String sslKeyStoreLocation)
setSSLKeyStoreLocation in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslKeyStoreLocation - The SSL Key Store Locationpublic void setSSLKeyStorePassword(java.lang.String sslKeyStorePassword)
setSSLKeyStorePassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslKeyStorePassword - The SSL Key Store Passwordpublic void setSSLKeyMgrAlgorithm(java.lang.String sslKeyMgrAlgorithm)
setSSLKeyMgrAlgorithm in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsslKeyMgrAlgorithm - The SSL Key Store Manager Algorithmpublic void setKeyStoreType(java.lang.String keyStoreType)
setKeyStoreType in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplkeyStoreType - The Key Store Type.
Valid values include "JKS" or "PKCS12".public void setSecureSocketProtocol(java.lang.String secureSocketProtocol)
setSecureSocketProtocol in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplsecureSocketProtocol - The Secure Socket Protocol
Valid values include "SSL", "SSLv3", "TLSv1.1", "TLSv1.2",
etc.public void setUser(java.lang.String user)
setUser in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpluser - User name.public void setPassword(java.lang.String password)
setPassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpassword - User password valuepublic void setFetchSize(int fetchsize)
fetchsize - Fetch size valuepublic void setMaxRows(int maxRows)
maxRows - Max rows valuepublic void setTreatInvalidDecimalAsNull(boolean treatInvalidDecimalAsNull)
public void setFlattenTables(boolean flattenTables)
public void setPreloadUserTypeConverters(boolean preloadUserTypeConverters)
setPreloadUserTypeConverters in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic void setSignedCompare(boolean signedCompare)
public void setCurrentSchema(java.lang.String currentSchema)
setCurrentSchema in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplcurrentSchema - Current schema valuepublic void setLLField(boolean llField)
llField - llField valuepublic void setJDBCConnection(boolean isJDBC)
java.sql.Connection versus a javax.resource.cci.Connection.
The default is false.isJDBC - true indicates java.sql.Connection, false indicates
javax.resource.cci.Connectionpublic void setPoolConnections(boolean poolConnections)
false.poolConnections - public void setInitStatusGroup(java.lang.String initStatusGroup)
setInitStatusGroup in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplinitStatusGroup - public void setExpandArrayResultSet(boolean expandArrayResultSet)
setExpandArrayResultSet in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplexpandArrayResultSet - public void setSsaOptimization(boolean ssaOptimization)
setSsaOptimization in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplssaOptimization - public void setRemoveInvalidCaseFields(boolean removeInvalidCaseFields)
setRemoveInvalidCaseFields in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplremoveInvalidCaseFields - public java.lang.Boolean getJDBCConnection()
getJDBCConnection in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpltrue indicates that the connection the
application receives will be a java.sql.Connection. false indicates
that the connection will be a javax.resource.cci.Connection.public java.lang.String getMetadataURL()
getDatabaseName()getMetadataURL in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getDatabaseName()
getDatabaseName in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getDatastoreName()
getDatastoreName in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getDatastoreServer()
getDatastoreServer in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.Integer getPortNumber()
getPortNumber in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getDriverType()
getDriverType in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.Boolean getSSLConnection()
getSSLConnection in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpltrue indicates SSL will be used, false indicates otherwisepublic java.lang.String getSslTrustStoreLocation()
getSslTrustStoreLocation in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSslTrustStorePassword()
getSslTrustStorePassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSslTrustMgrAlgorithm()
getSslTrustMgrAlgorithm in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSslKeyStoreLocation()
getSslKeyStoreLocation in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSslKeyStorePassword()
getSslKeyStorePassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSslKeyMgrAlgorithm()
getSslKeyMgrAlgorithm in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getKeyStoreType()
getKeyStoreType in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getSecureSocketProtocol()
getSecureSocketProtocol in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getUser()
getUser in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getPassword()
getPassword in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.Integer getFetchSize()
getFetchSize in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.Integer getMaxRows()
getMaxRows in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getCurrentSchema()
getCurrentSchema in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.Boolean getLLField()
getLLField in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic java.lang.String getInitStatusGroup()
getInitStatusGroup in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic boolean getExpandArrayResultSet()
getExpandArrayResultSet in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplexpandArrayResultSet - public boolean getSsaOptimization()
getSsaOptimization in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplssaOptimization - public boolean getRemoveInvalidCaseFields()
getRemoveInvalidCaseFields in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplpublic void setLogWriter(java.io.PrintWriter out)
ManagedConnectionFactory object to the given
java.io.PrintWriter object.The log writer is a character output stream to which all logging and tracing messages for this data source will be printed. This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object, and so on.
setLogWriter in interface javax.resource.spi.ManagedConnectionFactorysetLogWriter in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplout - the new log writer; to disable logging, set to null.public java.io.PrintWriter getLogWriter()
ManagedConnectionFactory object.
The log writer is a character output stream to which all logging and tracing messages
for this data source will be printed. This includes messages printed by the methods of this object,
messages printed by methods of other objects manufactured by this object, and so on. The log writer
is initially null; in other words, the default is for logging to be disabled.getLogWriter in interface javax.resource.spi.ManagedConnectionFactorygetLogWriter in class com.ibm.ims.db.spi.ManagedConnectionFactoryImplnull if logging is disabled