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, setUtcLibPaths
public 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.ManagedConnectionFactory
createConnectionFactory
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
Object
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.ManagedConnectionFactoryImpl
metadataURL
- metadata urlpublic void setDatabaseName(java.lang.String databaseName)
setDatabaseName
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
databaseName
- database namepublic void setDatastoreName(java.lang.String datastoreName)
setDatastoreName
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
datastoreName
- IMS datastore namepublic void setDatastoreServer(java.lang.String datastoreServer)
setDatastoreServer
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
datastoreServer
- 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.ManagedConnectionFactoryImpl
driverType
- 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.ManagedConnectionFactoryImpl
sslTrustStoreLocation
- The SSL Trust Store Locationpublic void setSSLTrustStorePassword(java.lang.String sslTrustStorePassword)
setSSLTrustStorePassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
sslTrustStorePassword
- The SSL Trust Store Passwordpublic void setSSLTrustMgrAlgorithm(java.lang.String sslTrustMgrAlgorithm)
setSSLTrustMgrAlgorithm
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
sslTrustMgrAlgorithm
- The SSL Trust Store Manager Algorithmpublic void setSSLKeyStoreLocation(java.lang.String sslKeyStoreLocation)
setSSLKeyStoreLocation
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
sslKeyStoreLocation
- The SSL Key Store Locationpublic void setSSLKeyStorePassword(java.lang.String sslKeyStorePassword)
setSSLKeyStorePassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
sslKeyStorePassword
- The SSL Key Store Passwordpublic void setSSLKeyMgrAlgorithm(java.lang.String sslKeyMgrAlgorithm)
setSSLKeyMgrAlgorithm
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
sslKeyMgrAlgorithm
- The SSL Key Store Manager Algorithmpublic void setKeyStoreType(java.lang.String keyStoreType)
setKeyStoreType
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
keyStoreType
- 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.ManagedConnectionFactoryImpl
secureSocketProtocol
- 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.ManagedConnectionFactoryImpl
user
- User name.public void setPassword(java.lang.String password)
setPassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
password
- 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.ManagedConnectionFactoryImpl
public void setSignedCompare(boolean signedCompare)
public void setCurrentSchema(java.lang.String currentSchema)
setCurrentSchema
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
currentSchema
- 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.Connection
public void setPoolConnections(boolean poolConnections)
false
.poolConnections
- public void setInitStatusGroup(java.lang.String initStatusGroup)
setInitStatusGroup
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
initStatusGroup
- public void setExpandArrayResultSet(boolean expandArrayResultSet)
setExpandArrayResultSet
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
expandArrayResultSet
- public void setSsaOptimization(boolean ssaOptimization)
setSsaOptimization
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
ssaOptimization
- public void setRemoveInvalidCaseFields(boolean removeInvalidCaseFields)
setRemoveInvalidCaseFields
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
removeInvalidCaseFields
- public java.lang.Boolean getJDBCConnection()
getJDBCConnection
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
true
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.ManagedConnectionFactoryImpl
public java.lang.String getDatabaseName()
getDatabaseName
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getDatastoreName()
getDatastoreName
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getDatastoreServer()
getDatastoreServer
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.Integer getPortNumber()
getPortNumber
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getDriverType()
getDriverType
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.Boolean getSSLConnection()
getSSLConnection
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
true
indicates SSL will be used, false
indicates otherwisepublic java.lang.String getSslTrustStoreLocation()
getSslTrustStoreLocation
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSslTrustStorePassword()
getSslTrustStorePassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSslTrustMgrAlgorithm()
getSslTrustMgrAlgorithm
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSslKeyStoreLocation()
getSslKeyStoreLocation
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSslKeyStorePassword()
getSslKeyStorePassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSslKeyMgrAlgorithm()
getSslKeyMgrAlgorithm
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getKeyStoreType()
getKeyStoreType
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getSecureSocketProtocol()
getSecureSocketProtocol
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getUser()
getUser
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getPassword()
getPassword
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.Integer getFetchSize()
getFetchSize
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.Integer getMaxRows()
getMaxRows
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getCurrentSchema()
getCurrentSchema
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.Boolean getLLField()
getLLField
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public java.lang.String getInitStatusGroup()
getInitStatusGroup
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public boolean getExpandArrayResultSet()
getExpandArrayResultSet
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
expandArrayResultSet
- public boolean getSsaOptimization()
getSsaOptimization
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
ssaOptimization
- public boolean getRemoveInvalidCaseFields()
getRemoveInvalidCaseFields
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
public 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.ManagedConnectionFactory
setLogWriter
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
out
- 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.ManagedConnectionFactory
getLogWriter
in class com.ibm.ims.db.spi.ManagedConnectionFactoryImpl
null
if logging is disabled