public class IMSXADataSource
extends java.lang.Object
implements javax.sql.XADataSource
IMSXADataSource
is used as a factory for XAConnection
objects and
enables your JDBC application to participate in two-phase commit transactions against IMS databases.Modifier and Type | Field and Description |
---|---|
static int |
DRIVER_TYPE_4
Constant indicating the driver is pure Java and implements the network protocol for the data source.
|
Constructor and Description |
---|
IMSXADataSource()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatabaseName()
Retrieves the database name this DataSource is configured to access.
|
java.lang.String |
getDatastoreName()
Retrieves name of the IMS datastore this
XADataSource is configured to access. |
java.lang.String |
getDatastoreServer()
Retrieves the name or IP address of your datastore server (IMS Connect).
|
java.lang.String |
getDescription()
Retrieves the description of this
XADataSource . |
int |
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.
|
int |
getLoginTimeout()
Retrieves the login timeout for this
XADataSource object |
java.io.PrintWriter |
getLogWriter()
Retrieves the log writer for this
XADataSource object. |
java.lang.String |
getMetadataURL()
Deprecated.
|
java.util.logging.Logger |
getParentLogger() |
java.lang.String |
getPassword()
Retrieves the user password.
|
int |
getPortNumber()
Retrieves the port number.
|
void |
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.
|
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.String |
getUser()
Retrieves the user name.
|
javax.sql.XAConnection |
getXAConnection()
Retrieves the
XAConnection object. |
javax.sql.XAConnection |
getXAConnection(java.lang.String user,
java.lang.String password)
Retrieves the
XAConnection object, using the given user name and password. |
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 |
setDescription(java.lang.String description)
Sets the description of this
XADataSource . |
void |
setDriverType(int 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 |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect
to a database.
|
void |
setLogWriter(java.io.PrintWriter out)
Sets the log writer for this
XADataSource object to the given java.io.PrintWriter
object. |
void |
setMetadataURL(java.lang.String metadataURL)
Deprecated.
|
void |
setPassword(java.lang.String password)
Sets the user password.
|
void |
setPortNumber(int portNumber)
Sets the port number to be used to communicate with IMS Connect.
|
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 |
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 |
setUser(java.lang.String user)
Sets the user name
|
public static final int DRIVER_TYPE_4
public javax.sql.XAConnection getXAConnection() throws java.sql.SQLException
XAConnection
object.getXAConnection
in interface javax.sql.XADataSource
XAConnection
object, which represents a physical database
connection that can be used in a distributed transaction.java.sql.SQLException
public javax.sql.XAConnection getXAConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
XAConnection
object, using the given user name and password.getXAConnection
in interface javax.sql.XADataSource
user
- the user namepassword
- the user passwordXAConnection
object, which represents a physical database
connection that can be used in a distributed transaction.java.sql.SQLException
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
XADataSource
object.
The log writer is a character output stream to which all logging and tracing messages
for this XADataSource
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.
Messages printed to a data source specific log writer are not printed to the log writer associated
with the java.sql.Drivermanager
class. When a XADataSource
object is created, the log writer is initially null; in other words, the default is for
logging to be disabled.
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
XADataSource
objectgetLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
XADataSource
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
XADataSource
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. Messages printed to a data source specific log writer are
not printed to the log writer associated with the java.sql.Drivermanager
class.
When a XADataSource
object is created the log writer is initially null
;
in other words, the default is for logging to be disabled.
setLogWriter
in interface javax.sql.CommonDataSource
out
- the new log writer; to disable logging, set to null
java.sql.SQLException
public void setLoginTimeout(int seconds) throws java.sql.SQLException
XADataSource
object is created, the login timeout
is initially zero.setLoginTimeout
in interface javax.sql.CommonDataSource
seconds
- the data source login time limitjava.sql.SQLException
public java.lang.String getMetadataURL()
getDatabaseName()
public void setMetadataURL(java.lang.String metadataURL)
setDatabaseName(String)
metadataURL
- metadata urlpublic java.lang.String getDatabaseName()
public void setDatabaseName(java.lang.String databaseName)
databaseName
- database namepublic java.lang.String getDatastoreServer()
public void setDatastoreServer(java.lang.String datastoreServer)
datastoreServer
- name or IP address of the datastore server (IMS Connect)public java.lang.String getDescription()
XADataSource
.public void setDescription(java.lang.String description)
XADataSource
.description
- the descriptionpublic int getDriverType()
public void setDriverType(int driverType)
driverType
- Only IMSXADataSource.DRIVER_TYPE_4 is currently supported.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- User password valuepublic int getPortNumber()
public void setPortNumber(int portNumber)
By default, the port number is 8888.
portNumber
- port numberpublic java.lang.String getDatastoreName()
XADataSource
is configured to access.public void setDatastoreName(java.lang.String datastoreName)
datastoreName
- IMS datastore namepublic java.lang.String getUser()
public void setUser(java.lang.String user)
user
- User name.public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException
getParentLogger
in interface javax.sql.CommonDataSource
java.sql.SQLFeatureNotSupportedException
public void setRemoveInvalidCaseFields(boolean removeInvalidCaseFields)
removeInvalidCaseFields
- public void getRemoveInvalidCaseFields()
public void setExpandArrayResultSet(boolean expandArrayResultSet)
expandArrayResultSet
- public void setSsaOptimization(boolean ssaOptimization)
ssaOptimization
- public boolean getExpandArrayResultSet()
expandArrayResultSet
- public boolean getSsaOptimization()
ssaOptimization
-