public class IMSXADataSource extends Object implements 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 |
|---|---|
String |
getDatabaseName()
Retrieves the database name this DataSource is configured to access.
|
String |
getDatastoreName()
Retrieves name of the IMS datastore this
XADataSource is configured to access. |
String |
getDatastoreServer()
Retrieves the name or IP address of your datastore server (IMS Connect).
|
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 |
PrintWriter |
getLogWriter()
Retrieves the log writer for this
XADataSource object. |
String |
getMetadataURL()
Deprecated.
|
Logger |
getParentLogger() |
String |
getPassword()
Retrieves the user password.
|
int |
getPortNumber()
Retrieves the port number.
|
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. |
String |
getUser()
Retrieves the user name.
|
XAConnection |
getXAConnection()
Retrieves the
XAConnection object. |
XAConnection |
getXAConnection(String user,
String password)
Retrieves the
XAConnection object, using the given user name and password. |
void |
setDatabaseName(String databaseName)
Sets the name of the target IMS database to be accessed.
|
void |
setDatastoreName(String datastoreName)
Sets the name of the IMS datastore to access.
|
void |
setDatastoreServer(String datastoreServer)
Sets the name or IP address of the datastore server (IMS Connect).
|
void |
setDescription(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(PrintWriter out)
Sets the log writer for this
XADataSource object to the given java.io.PrintWriter
object. |
void |
setMetadataURL(String metadataURL)
Deprecated.
|
void |
setPassword(String password)
Sets the user password.
|
void |
setPortNumber(int portNumber)
Sets the port number to be used to communicate with IMS Connect.
|
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(String user)
Sets the user name
|
public static final int DRIVER_TYPE_4
public XAConnection getXAConnection() throws SQLException
XAConnection object.getXAConnection in interface XADataSourceXAConnection object, which represents a physical database
connection that can be used in a distributed transaction.SQLExceptionpublic XAConnection getXAConnection(String user, String password) throws SQLException
XAConnection object, using the given user name and password.getXAConnection in interface XADataSourceuser - the user namepassword - the user passwordXAConnection object, which represents a physical database
connection that can be used in a distributed transaction.SQLExceptionpublic PrintWriter getLogWriter() throws 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 CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
XADataSource objectgetLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws 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 CommonDataSourceout - the new log writer; to disable logging, set to nullSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
XADataSource object is created, the login timeout
is initially zero.setLoginTimeout in interface CommonDataSourceseconds - the data source login time limitSQLExceptionpublic String getMetadataURL()
getDatabaseName()public void setMetadataURL(String metadataURL)
setDatabaseName(String)metadataURL - metadata urlpublic String getDatabaseName()
public void setDatabaseName(String databaseName)
databaseName - database namepublic String getDatastoreServer()
public void setDatastoreServer(String datastoreServer)
datastoreServer - name or IP address of the datastore server (IMS Connect)public String getDescription()
XADataSource.public void setDescription(String description)
XADataSource.description - the descriptionpublic int getDriverType()
public void setDriverType(int driverType)
driverType - Only IMSXADataSource.DRIVER_TYPE_4 is currently supported.public String getPassword()
public void setPassword(String password)
password - User password valuepublic int getPortNumber()
public void setPortNumber(int portNumber)
By default, the port number is 8888.
portNumber - port numberpublic String getDatastoreName()
XADataSource is configured to access.public void setDatastoreName(String datastoreName)
datastoreName - IMS datastore namepublic String getUser()
public void setUser(String user)
user - User name.public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionpublic void setExpandArrayResultSet(boolean expandArrayResultSet)
expandArrayResultSet - public void setSsaOptimization(boolean ssaOptimization)
ssaOptimization - public boolean getExpandArrayResultSet()
expandArrayResultSet - public boolean getSsaOptimization()
ssaOptimization - (c) Copyright IBM Corporation 2008, 2017.