This key contains the bundle name of the property file that contains the configuration specific to Database connectivity:
Config Key |
Mandatory/ Optional |
Type |
Purpose |
---|---|---|---|
CT_FW_IBATIS_DATASOURCE_KEY |
Mandatory |
String |
This key is used to provide the iBatis data source key for CT framework. |
CT_FW_DATASOURCE |
Mandatory |
String |
This key is used to provide data source that must be used by the CT framework for connecting to its data model. |
CT_FW_DATABASE_VENDOR |
Mandatory |
String |
This key is used to provide the database vendor for which vendor-specific-scripts will be loaded. The possible valid values for this option are:
|
DATASOURCE_NAME |
Mandatory |
String |
This key is used to provide the name of the implementation data source. |
PROVIDER_URL |
Optional |
String |
This key is used to provide the provider URL. |
JNDI_FACTORY |
Optional |
String |
This key is used to provide the default JNDI API for data source connection.The value must be org.apache.naming.NamingContext |
CT_IBATIS_DATASOURCE_KEYS |
Mandatory |
Comma separated String |
This key provides the list of Logical data sources that the application wishes to use. You must ensure to not include the Data Source name provided under the key CT_FW_IBATIS_DATASOURCE_KEY. |
CT_MODEL_HOUSE_DSXML |
Mandatory |
Resource Path |
For every data source configured under CT_IBATIS_DATASOURCE_KEYS, it is expected that the iBatis configuration XML that corresponds to this Logical data source is pointed out here. |
CT_DEFAULT_IBATIS_DATASOURCE_KEY |
Mandatory |
String |
This is the Logical data source that must be taken as the default by the framework whenever a developer tries to execute a Database request without explicitly providing the Logical Data Source. This must be one of the data sources defined under the key CT_IBATIS_DATASOURCE_KEYS. |
USER_TXN_NAME.JNDIName |
Mandatory |
String |
This key is used to provide the JNDIName for the user transaction that is getting created. |
REMOTE_TXN_NAME.JNDIName |
Mandatory |
String |
This key is used to provide the JNDIName for the remote user transaction that is getting created. |
The following is a sample data base configuration databaseconfig.properties (as per the name given in the default descriptor):
# The FW Datasource key, framework datasource name and database vendor
###########################################################################################
CT_FW_IBATIS_DATASOURCE_KEY = CT_DS
# The data source that should be used by the CT framework for connecting to its data
# model
# CT_FW_DATASOURCE =java:/comp/env/jdbc/OraSource
CT_FW_DATASOURCE =java:/OraSource
# The database vendor for which vendor specific scripts will be loaded.
#CT_FW_DATABASE_VENDOR=mysql
# CT_FW_DATABASE_VENDOR=db2
#CT_FW_DATABASE_VENDOR=mssql
CT_FW_DATABASE_VENDOR=oracle
###########################################################################################
# The Impl Datasource key Name
###########################################################################################
#WebLogic
#DATASOURCE_NAME=ImplOraSource
#PROVIDER_URL=localhost:7001
#JNDI_FACTORY=weblogic.jndi.WLInitialContextFactory
#################################################################################################
#JBOSS
# DATASOURCE_NAME=java:/comp/env/jdbc/ImplOraSource
DATASOURCE_NAME=java:/ImplOraSource
PROVIDER_URL=localhost:9080
JNDI_FACTORY=org.apache.naming.NamingContext
###########################################################################################
# The Impl Datasource keys and its corresponding ibatis sql map file
###########################################################################################
#CT_IBATIS_DATASOURCE_KEYS =
#[CT_IBATIS_DATASOURCE_KEY]_DSXML =
CT_IBATIS_DATASOURCE_KEYS = CT_MODEL_HOUSE
CT_MODEL_HOUSE_DSXML = com/intellectdesign/modelhouse/database/ibatis/config/CTIMPLDatabaseConfig.xml
###########################################################################################
# The default ibatis datasource key for the implementation sql map file
###########################################################################################
CT_DEFAULT_IBATIS_DATASOURCE_KEY=CT_MODEL_HOUSE
###########################################################################################
# The JNDIName for the user transaction which is getting created.
###########################################################################################
USER_TXN_NAME.JNDIName=java:comp/UserTransaction
REMOTE_TXN_NAME.JNDIName=java:comp/UserTransaction