Package All Classes All Fields and Methods Deprecated
java.lang.Objectcom.ibm.connector2.ims.ico.IMSManagedConnectionFactory
An IMSManagedConnectionFactory instance is a factory for IMSConnectionFactory instances and IMSManagedConnection instances.
In addition, an IMSManagedConnectionFactory supports connection pooling by providing methods for matching and creating connections.
In a managed environment, instances of IMSManagedConnectionFactory are created by using a deployment tool. Each instance is configured by the tool using a property set. A property set represents a specific configuration for creating connections to a specific EIS instance. In a non-managed environment, an application developer writes this code.
Field Summary |
Fields inherited from interface com.ibm.ims.ico.IMSICOProperties |
COMMIT_THEN_SEND, DEFAULT_ALTCLIENTID_NAME, DEFAULT_CM0DEDICATED, DEFAULT_COMMIT_MODE, DEFAULT_CURRENT_SEGMENT, DEFAULT_DATASTORE_NAME, DEFAULT_ENCRYPTYPE, DEFAULT_GROUPNAME, DEFAULT_HOSTNAME, DEFAULT_IMSCONNNAME, DEFAULT_ISSSL, DEFAULT_KEYSTORENAME, DEFAULT_KEYSTOREPASSWD, DEFAULT_LTERM_NAME, DEFAULT_MAP_NAME, DEFAULT_PASSWORD, DEFAULT_PORTNUMBER, DEFAULT_REPOSITORYID, DEFAULT_REPOSITORYURI, DEFAULT_REROUTE_NAME, DEFAULT_TRUSTSTORENAME, DEFAULT_TRUSTSTOREPASSWD, DEFAULT_USERNAME, ENCRYPTYPE_0, ENCRYPTYPE_1, ENCRYPTYPE_2, IBM_SSL_CERT_TYPE, MAX_ALTCLIENTIDNAME, MAX_CIPHER_ARRAY, MAX_CLIENTID, MAX_DATASTORENAME, MAX_GROUPNAME, MAX_IMSCONNNAME, MAX_LTERMNAME, MAX_MAPNAME, MAX_PASSWORD, MAX_REROUTENAME, MAX_SSLSTOREPASSWORD, MAX_USERNAME, MODE_ACK_TEXT, MODE_COMMIT_TEXT, MODE_END_CONVERSATION_TEXT, MODE_FORGET_TEXT, MODE_NACK_TEXT, MODE_PREPARE_TEXT, MODE_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT_TEXT, MODE_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT_TEXT, MODE_RECEIVE_ASYNCOUTPUT_TEXT, MODE_RECEIVE_TEXT, MODE_RECOVER_TEXT, MODE_ROLLBACK_TEXT, MODE_SEND_ONLY_TEXT, MODE_SEND_RECEIVE_TEXT, SEND_THEN_COMMIT, SSL_PROVIDER, SSL_STORE_TYPE_JCE4758RACFKS, SSL_STORE_TYPE_JCERACFKS, SSL_STORE_TYPE_JKS, SUN_SSL_CERT_TYPE, SYNC_LEVEL_CONFIRM, SYNC_LEVEL_NONE, SYNC_LEVEL_SYNCPT |
Constructor Summary | |
IMSManagedConnectionFactory()
|
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener for all the properties. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener for a specific property. |
java.lang.Object |
createConnectionFactory()
This variant of the createConnectionFactory method (with no arguments) is used by an application in a non-managed environment to create an IMSConnectionFactory instance. |
java.lang.Object |
createConnectionFactory(javax.resource.spi.ConnectionManager aConnManager)
This variant of the createConnectionFactory method is used by an application in a managed environment to create an IMSConnectionFactory instance. |
javax.resource.spi.ManagedConnection |
createManagedConnection(javax.security.auth.Subject aSubject,
javax.resource.spi.ConnectionRequestInfo aConnectionRequestInfo)
Creates a new IMSManagedConnection instance to represent the physical connection between IMS Connector for Java and IMS Connect. |
boolean |
equals(java.lang.Object anObject)
Determines if the input object matches set of configuration properties that make this IMSManagedConnectionFactory instance unique and specific to a particular IMS Connect. |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
The firePropertyChange method was generated to support the propertyChange field. |
java.lang.Boolean |
getCM0Dedicated()
Returns the value of the CM0Dedicated property. |
java.lang.String |
getDataStoreName()
Returns the value of the DataStoreName property. |
java.lang.String |
getGroupName()
Returns the value of the GroupName property. |
java.lang.String |
getHostName()
Returns the value of the HostName property. |
java.lang.String |
getIMSConnectName()
Returns the value of the IMS Connect name property. |
java.io.PrintWriter |
getLogWriter()
Returns the value of the logWriter property. |
java.lang.String |
getMFSXMIRepositoryID()
Returns the value of the MFS XMI Repository ID. |
java.lang.String |
getMFSXMIRepositoryURI()
Returns the value of the MFS XMI Repository URI. |
java.lang.String |
getPassword()
Returns the value of the Password property. |
java.lang.Integer |
getPortNumber()
Returns the value of the PortNumber property. |
java.beans.PropertyChangeSupport |
getPropertyChange()
Return a PropertyChangeSupport object to be used to maintain a property change listener list and fire property change events for the IMSManagedConnectionFactory object. |
javax.resource.spi.ResourceAdapter |
getResourceAdapter()
Return ResourceAdapter JavaBean associated with this ManagedConnectionFactory JavaBean. |
java.lang.Boolean |
getRRSTransactional()
Returns the value of the RRSTransactional property. |
java.lang.Boolean |
getSSLEnabled()
Returns the value of the SSLEnabled property. |
java.lang.String |
getSSLEncryptionType()
Returns the value of the SSLEncryptionType property. |
java.lang.String |
getSSLKeyStoreName()
Returns the value of the SSLKeyStoreName property. |
java.lang.String |
getSSLKeyStorePassword()
Returns the value of the SSLKeyStorePassword property. |
java.lang.String |
getSSLTrustStoreName()
Returns the value of the SSLTrustStoreName property. |
java.lang.String |
getSSLTrustStorePassword()
Returns the value of the SSLTrustStorePassword property. |
java.lang.String |
getThreadIdentitySupport()
Returns the value of the appropriate xxxthreadIdentitySupport property, where xxx is either TCPIP or LocalOption. |
boolean |
getThreadSecurity()
Returns the value of the threadSecurity property. |
java.lang.Integer |
getTraceLevel()
Returns the value of the traceLevel property. |
java.lang.String |
getTransactionResourceRegistration()
Returns the value of the Transaction Resource Registration property. |
java.lang.String |
getUserName()
Returns the value of the UserName property. |
int |
hashCode()
Returns the hash code of the configuration properties that make this IMSManagedConnectionFactory instance unique. |
javax.resource.spi.ManagedConnection |
matchManagedConnections(java.util.Set aConnectionSet,
javax.security.auth.Subject aSubject,
javax.resource.spi.ConnectionRequestInfo aConnRequestInfo)
Returns an IMSManagedConnection instance from aConnectionSet. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property. |
void |
setCM0Dedicated(java.lang.Boolean isCM0Dedicated)
Sets the value of the CM0Dedicated property of an IMSManagedConnectionFactory instance. |
void |
setDataStoreName(java.lang.String aDataStoreName)
Sets the value of the DataStoreName property of an IMSManagedConnectionFactory instance. |
void |
setGroupName(java.lang.String aGroupName)
Sets the value of the GroupName property of an IMSManagedConnectionFactory instance. |
void |
setHostName(java.lang.String aHostName)
Sets the value of the HostName property of an IMSManagedConnectionFactory instance. |
void |
setIMSConnectName(java.lang.String aIMSConnName)
Sets the value of the IMS Connect Name property of an IMSManagedConnectionFactory instance. |
void |
setLogWriter(java.io.PrintWriter aLogWriter)
Sets the value of the logWriter property of an IMSManagedConnectionFactory instance. |
void |
setMFSXMIRepositoryID(java.lang.String repositoryID)
Sets the value of MFS XMI repository ID. |
void |
setMFSXMIRepositoryURI(java.lang.String repositoryURI)
Sets the value of MFS XMI repository URI. |
void |
setPassword(java.lang.String aPassword)
Sets the value of the Password property of an IMSManagedConnectionFactory instance. |
void |
setPortNumber(java.lang.Integer aPortNumber)
Sets the value of the PortNumber property of an IMSManagedConnectionFactory instance. |
void |
setResourceAdapter(javax.resource.spi.ResourceAdapter aResourceAdapter)
Prior to using a ManagedConnectionFactory JavaBean, the application server must create an association between the ManagedConnectionFactory JavaBean and a ResourceAdapter JavaBean by calling setResourceAdapter(). |
void |
setSSLEnabled(java.lang.Boolean isSSL)
Sets the value of the SSLEnabled property of an IMSManagedConnectionFactory instance. |
void |
setSSLEncryptionType(java.lang.String aEncrypType)
Sets the value of the SSLEncryptionType property of an IMSManagedConnectionFactory instance. |
void |
setSSLKeyStoreName(java.lang.String aKeyStoreName)
Sets the value of the SSLKeyStoreName property of an IMSManagedConnectionFactory instance. |
void |
setSSLKeyStorePassword(java.lang.String aKeyStorePasswd)
Sets the value of the SSLKeyStorePassword property of an IMSManagedConnectionFactory instance. |
void |
setSSLTrustStoreName(java.lang.String aTrustStoreName)
Sets the value of the SSLTrustStoreName property of an IMSManagedConnectionFactory instance. |
void |
setSSLTrustStorePassword(java.lang.String aTrustStorePasswd)
Sets the value of the SSLTrustStorePassword property of an IMSManagedConnectionFactory instance. |
void |
setTraceLevel(java.lang.Integer aTraceLevel)
Sets the value of the traceLevel property of an IMSManagedConnectionFactory instance. |
void |
setTransactionResourceRegistration(java.lang.String str)
Sets the value of the Transaction Resource Registration property. |
void |
setUserName(java.lang.String aUserName)
Sets the value of the UserName property of an IMSManagedConnectionFactory instance. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IMSManagedConnectionFactory()
Method Detail |
public java.beans.PropertyChangeSupport getPropertyChange()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added.propertyName
- The name of the property to listen on.public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed.public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
propertyName
- The name of the property that was listened on.listener
- The PropertyChangeListener to be removed.public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public java.lang.Object createConnectionFactory() throws javax.resource.ResourceException
For this form of the createConnectionFactory method, an IMSConnectionFactory instance is created with the default connection manager from the IBM Common Connector Framework 2 class libraries (com.ibm.connector2.spi.DefaultConnectionManager).
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
- If there is a
problem creating a new IMSConnectionFactory object.public java.lang.Object createConnectionFactory(javax.resource.spi.ConnectionManager aConnManager) throws javax.resource.ResourceException
createConnectionFactory
in interface javax.resource.spi.ManagedConnectionFactory
aConnManager
- A ConnectionManager instance,
provided by the application server.
javax.resource.ResourceException
- If the value passed for aConnManager is null.public javax.resource.spi.ManagedConnection createManagedConnection(javax.security.auth.Subject aSubject, javax.resource.spi.ConnectionRequestInfo aConnectionRequestInfo) throws javax.resource.ResourceException
An application component uses an IMSConnection object, an application level handle to an IMSManagedConnection instance, to access IMS OTMA through IMS Connect.
createManagedConnection
in interface javax.resource.spi.ManagedConnectionFactory
aSubject
- Security information for container-managed
sign-on.aConnectionRequestInfo
- Security information (UserName,
Password, and GroupName)
for component-managed sign-on.
javax.resource.ResourceException
- if:
IMSManagedConnection
public boolean equals(java.lang.Object anObject)
equals
in interface javax.resource.spi.ManagedConnectionFactory
anObject
- IMSManagedConnectionFactory
object to test.
public java.lang.String getDataStoreName()
setDataStoreName(String)
public java.lang.String getGroupName()
setGroupName(String)
public java.lang.String getHostName()
setHostName(String)
public java.lang.String getIMSConnectName()
setIMSConnectName(String)
public java.io.PrintWriter getLogWriter() throws javax.resource.ResourceException
getLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
javax.resource.ResourceException
setLogWriter(PrintWriter)
public java.lang.String getPassword()
setPassword(String)
public java.lang.Integer getPortNumber()
setPortNumber(Integer)
public java.lang.Boolean getRRSTransactional()
Currently, IMS Connector for Java supports RRS transactions if the IMSManagedConnectionFactory instance is configured to use local option communication.
public java.lang.String getThreadIdentitySupport()
setPortNumber(java.lang.Integer)
public boolean getThreadSecurity()
public java.lang.Integer getTraceLevel()
setTraceLevel(Integer)
,
IMSTraceLevelProperties
public java.lang.String getTransactionResourceRegistration()
public java.lang.String getUserName()
setUserName(String)
public java.lang.String getMFSXMIRepositoryURI()
setMFSXMIRepositoryURI(String)
public java.lang.String getMFSXMIRepositoryID()
setMFSXMIRepositoryID(String)
public int hashCode()
hashCode
in interface javax.resource.spi.ManagedConnectionFactory
public javax.resource.spi.ManagedConnection matchManagedConnections(java.util.Set aConnectionSet, javax.security.auth.Subject aSubject, javax.resource.spi.ConnectionRequestInfo aConnRequestInfo) throws javax.resource.ResourceException
The matchManagedConnections method also sets the DataStoreName parameter of the returned instance to that of the IMSManagedConnectionFactory instance.
matchManagedConnections
in interface javax.resource.spi.ManagedConnectionFactory
aConnectionSet
- A set of IMSManagedConnection
instances provided by the
application server.aSubject
- Currently this parameter is
not used by this
implementation of matchManagedConnections.aConnRequestInfo
- Used to obtain the clientID when
locating an appropriate IMSManagedConnection
instance to use for a dedicated persistent
socket connection.
javax.resource.ResourceException
public void setDataStoreName(java.lang.String aDataStoreName) throws javax.resource.ResourceException
aDataStoreName
- The new value for the
DataStoreName property.
It must match the ID parameter of the
Datastore statement that is specified in
the IMS Connect configuration member when
IMS Connect is installed. It also serves
as the XCF member name for
IMS during internal XCF communications
between IMS Connect and OTMA.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getDataStoreName()
public void setGroupName(java.lang.String aGroupName) throws javax.resource.ResourceException
aGroupName
- The new value that will
be used for all connections if the default user name
is used. GroupName is used by IMS OTMA during authorization
of the user. Note: The GroupName property can
only be provided in a component-managed environment.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getGroupName()
public void setHostName(java.lang.String aHostName) throws javax.resource.ResourceException
This property applies to TCP/IP communication only.
aHostName
- The new value for the
HostName property,
the IP address or host name
of the machine running the target IMS Connect.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getHostName()
public void setIMSConnectName(java.lang.String aIMSConnName) throws javax.resource.ResourceException
This property applies to Local Option communication only. This property must be set to null (the default) if TCP/IP communication is used.
aIMSConnName
- The new value for the
IMSConnName property, the job name of the target IMS Connect.
This value must match the 'HWS ID' of the target IMS Connect.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getIMSConnectName()
public void setLogWriter(java.io.PrintWriter aLogWriter) throws javax.resource.ResourceException
setLogWriter
in interface javax.resource.spi.ManagedConnectionFactory
aLogWriter
- A log writer (character output stream)
to which all logging and tracing
messages for an IMSManagedConnectionFactory
instance are printed.
The log writer is initially null. When
the log writer is null, logging is disabled.
Note: Logging and tracing are also controlled by the value of the traceLevel property, in addition to the value of the logWriter property.
javax.resource.ResourceException
getLogWriter()
,
IMSTraceLevelProperties
public void setPassword(java.lang.String aPassword) throws javax.resource.ResourceException
aPassword
- The new value for the
Password property,
the password that will be used for connections
if the user name is used.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getPassword()
public void setPortNumber(java.lang.Integer aPortNumber) throws javax.resource.ResourceException
This property applies to TCP/IP communication only.
aPortNumber
- The new value for the
PortNumber property. This
property represents the number
of a port used by the target
IMS Connect for TCP/IP
connections (sockets).
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getPortNumber()
public void setTraceLevel(java.lang.Integer aTraceLevel) throws javax.resource.ResourceException
aTraceLevel
- The new value for the
traceLevel property.
The value of this property
controls the information that
is traced.
Note: Logging and tracing is also controlled by the value of the logWriter property, in addition to the value of the traceLevel property.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getTraceLevel()
,
IMSTraceLevelProperties
public void setTransactionResourceRegistration(java.lang.String str)
public void setUserName(java.lang.String aUserName) throws javax.resource.ResourceException
aUserName
- The new value for the
UserName property. This value will be used if no
UserName property is provided by the application component.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getUserName()
public java.lang.String getSSLEncryptionType()
setSSLEncryptionType(String)
public java.lang.Boolean getSSLEnabled()
setSSLEnabled(Boolean)
public java.lang.String getSSLKeyStoreName()
setSSLKeyStoreName(String)
public java.lang.String getSSLKeyStorePassword()
setSSLKeyStorePassword(String)
public java.lang.String getSSLTrustStoreName()
setSSLTrustStoreName(String)
public java.lang.String getSSLTrustStorePassword()
setSSLTrustStorePassword(String)
public java.lang.Boolean getCM0Dedicated()
setCM0Dedicated(Boolean)
public void setMFSXMIRepositoryURI(java.lang.String repositoryURI)
repositoryURI
- The new value for the
XMI repository URI. This
property represents the repository
location of XMI files.public void setMFSXMIRepositoryID(java.lang.String repositoryID)
repositoryID
- The new value for the
XMI repository ID. This
property represents the ID
associated with a repositorypublic void setSSLEnabled(java.lang.Boolean isSSL)
isSSL
- The new value for the
SSLEnabled property.
This property is only valid for TCP/IP connections.
A value of true indicates that IMS Connector for
Java will create an SSL socket connection to IMS Connect
using the HostName and PortNumber specified in these
connection properties. This port must be configured as
an SSL port by IMS Connect. A value of false indicates
that SSL sockets will not be used for connecting to the
port specified in the Port Number property.public void setSSLEncryptionType(java.lang.String aEncrypType) throws javax.resource.ResourceException
This property applies to TCP/IP SSL communication only.
aEncrypType
- The new value, strong or weak, for the
SSLEncryptionType property.
Strong and weak are related to the strength of the ciphers,
that is, the key length. All those ciphers that can be used
for export come under the weak category and the rest go into
the strong category. By default, the encryption type is set to weak.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case a default value will be used and an exception will be thrown later.
getSSLEncryptionType()
public void setSSLKeyStoreName(java.lang.String aKeyStoreName) throws javax.resource.ResourceException
This property applies to TCP/IP SSL communication only.
aKeyStoreName
- The new value for the
SSLKeyStoreName property. This is
the name (including its full file path) of the keystore.
Private keys and their associated public key certificates
are stored in password-protected databases called keystores.
For convenience, Trusted certificates can also be stored in
the keystore and the truststore property can either be empty or
could point to the keystore file. An example of a keystore name
is c:\keystore\MyKeystore.ks
Note: The file can have other file extensions; it does not have to be .ks.
Note: A value for SSLKeyStoreName is mandatory if the server (IMS Connect) has been configured to require client authentication. However, this cannot be determined at the time this set method is invoked.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case a default value will be used and an exception will be thrown later.
getSSLKeyStoreName()
public void setSSLTrustStoreName(java.lang.String aTrustStoreName) throws javax.resource.ResourceException
This property applies to TCP/IP SSL communication only.
aTrustStoreName
- The new value for the
SSLTrustStoreName property. This is the
full path and name of the location of
the Keystore file containing security
credentials; i.e., certificates .
A value for SSLTrustStoreName is
not mandatory, if a keystore is used.
name (including its full file path) of the truststore.
A truststore file is a key database file that contains
public keys or certificates. For convenience, private
keys can also be stored in the Truststore and the
Keystore property can either be empty or could point
to the Truststore file. An example of a truststore
name is c:\keystore\MyTruststore.ks
Note: The file can have other file extensions; it does not have to be .ks.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case a default value will be used and an exception will be thrown later.
getSSLTrustStoreName()
public void setSSLTrustStorePassword(java.lang.String aTrustStorePasswd) throws javax.resource.ResourceException
This property applies to TCP/IP SSL communication only.
aTrustStorePasswd
- The new value for the
SSLTrustStorePassword property,
the password for the truststore. A truststore file is a
key database file that contains public keys.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getSSLTrustStorePassword()
public void setSSLKeyStorePassword(java.lang.String aKeyStorePasswd) throws javax.resource.ResourceException
This property applies to TCP/IP SSL communication only.
aKeyStorePasswd
- The new value for the
SSLKeyStorePassword property,
the password for the keystore. Private keys and
their associated public key certificates are stored
in password-protected databases called keystores.
javax.resource.ResourceException
- Note: The tooling may ignore these exceptions, in which case default values will be used and an exception will be thrown later.
getSSLKeyStorePassword()
public void setCM0Dedicated(java.lang.Boolean isCM0Dedicated)
isCM0Dedicated
- The new value for the
CM0Dedicated property.
The default is false. A value of FALSE indicates the
connection factory will generate shareable persistent
socket connections and IMS Connector for Java will
generate a clientID to identify the socket connection.
These connections can be used by commit mode 0 and
commit mode 1 interactions. A value of TRUE indicates
the connection factory will generate dedicated
persistent socket connections, which require
user-specified clientIDs to identify the socket
connections. A dedicated persistent socket
connection is reserved for a particular clientID
and only commit mode 0 interactions are allowed.
This property applies to TCP/IP connections only.public void setResourceAdapter(javax.resource.spi.ResourceAdapter aResourceAdapter)
setResourceAdapter
in interface javax.resource.spi.ResourceAdapterAssociation
public javax.resource.spi.ResourceAdapter getResourceAdapter()
getResourceAdapter
in interface javax.resource.spi.ResourceAdapterAssociation