Configuration Descriptor: Database
This key contains the bundle name of the property file that contains the configuration specific to the 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_FILEIMPORT_DATASOURCE | Mandatory | String | This key is used to define the imported file as the data source, which is used by the CT framework to connect to the data model of the imported file. |
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:
This is used for switching the underlying database between Oracle or Microsoft SQL Server where the users and objects related to Canvas framework are created. |
DATASOURCE_NAME | Mandatory | String | This key is used to provide the name of the implementation data source. |
PROVIDER_URL | Mandatory | String | This key is used to provide the provider URL. |
JNDI_FACTORY | Mandatory | 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. In order to use the external data source, you have to define the data source key in this property and add two additional keys for the configuration. Refer Fetching Data from a Schema Different from Implementation Schema for more information. |
DS_SIGMA_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. Note The USER_TXN_NAME.JNDIName must be specified in databaseconfig.properties file, in accordance with the respective application server being used. The sample values for Tomcat, JBoss, WebLogic and WebSphere application servers are provided as follows: # For Tomcat USER_TXN_NAME.JNDIName = java:comp/UserTransaction # For JBoss USER_TXN_NAME.JNDIName = java:jboss/UserTransaction # For WebLogic USER_TXN_NAME.JNDIName = java:comp/UserTransaction # For WebSphere USER_TXN_NAME.JNDIName = java:comp/UserTransaction |
REMOTE_TXN_NAME.JNDIName | Mandatory | String | This key is used to provide the JNDIName for the remote user transaction that is getting created. |
MYBATIS_DATASOURCE_KEY | Optional | String | This key is needed in case of MyBatis usage to indicate the key value of the implementation data source. |
MYBATIS_DATASOURCE | Optional | String | This key is needed in case of MyBatis usage to indicate the name of the implementation data source. |
QUERY_MAX_NO_OF_ROWS | Optional | Number | This key is used to specify the maximum number of records to be displayed on the generated and downloaded reports in Sigma Application. By default one-lakh (100000) records is the limit. To set the maximum number of records to fifty-thousand limit, specify QUERY_MAX_NO_OF_ROWS = 50000. Ensure that the infrastructure has the ability to handle that many records to generate the reports. Sigma fails the report if the number of records exceeds the configured limit. |
DYNAMIC_CONNECTION_POOL_SIZE | Optional | Number | This key is used to indicate the count of the connection pool threads for a dynamic database. Based on this key, the size of the connection pool threads will determine the usage of database connections while the connection pool gets initialized. |
DATA_SOURCE_DEFAULT_NETWORK_TIMEOUT | Optional | Number | This key is used to specify the default network timeout of data sources. If the specified network timeout period is exceeded, then the execution of fetching the data from the configured data source in a report will get terminated, thereby resulting in a network timeout. The default network timeout must be specified only in milliseconds, for instance, if the timeout is specified as 20000, it is indicated that the execution of fetching the data from the configured data source in a report will get terminated, once the specified time of 20000 milliseconds (20 seconds) ends. |
CONNECTION_RETRY_COUNT | Optional | Number | This key is used to indicate the number of times based on which the retrieval of data connections will take place, based on the specified count. Once the retrieval of data connections exceed the number of retry count, then the retrieval of data connections will not take place, as the specified retry count has exceeded. For instance, if the retry count is specified as 2, then the retrieval of the data connection will take place for a couple of times. |
CONNECTION_RETRY_TIMER | Optional | Number | This key is used to indicate the timer, based on which the retrieval of data connection will take place. The retry timer should be specified only in milliseconds and based on the provided timer value, the data connections will get retrieved. For instance, if the retry timer value is specified as 2000 milliseconds, then the retrieval of the data connections will take place in a couple of seconds. |
ENABLE_MYBATISDATASOURCE_POOLING | Optional | Boolean | This key is used to enable or disable the pooling of the MyBatis-based data sets or data sources. To prevent the formation of stale connectivity issues, the pooling of MyBatis-based data sources is enabled to facilitate the process of the rigid connectivity mechanism. The MyBatis-based connection pool threads are processed in a streamlined manner, thereby eliminating the occurrence of the stale connection pooling issues. To enable the MyBatis data source pooling, specify the value for the key as Y, whereas to disable the pooling, specify the value as N. |
QUERY_TIMEOUT | Optional | Number | This key is used to terminate the execution of queries in a report, with regard to the specified period of the query timeout process. The query timeout period must be specified only in seconds, for instance, if the timeout is specified as 180, it is indicated that the execution of queries will be terminated once the specified time of 180 seconds (3 minutes) ends. Hence, it is essential that the execution of queries are processed for the query-based reports within the stipulated timeout period to get generated or else, if the timeout period exceeds the limit, then the query-based reports will not get generated. |
The following is a sample data base configuration Sigmadatabaseconfig.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/SigmaCanvasDataSource CT_FW_FILEIMPORT_DATASOURCE=java:comp/env/jdbc/DataImportTarget # 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 ########################################################################################### DATASOURCE_NAME=java:comp/env/jdbc/SigmaAppDataSource 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 = DS_SIGMA DS_SIGMA_DSXML=com/intellectdesign/app/sigma/database/ibatis/config/SigmaDBConfig.xml ########################################################################################### # The default ibatis datasource key for the implementation sql map file ########################################################################################### CT_DEFAULT_IBATIS_DATASOURCE_KEY=DS_SIGMA ########################################################################################### # The JNDIName for the user transaction which is getting created. ########################################################################################### USER_TXN_NAME.JNDIName=java:comp/UserTransaction REMOTE_TXN_NAME.JNDIName=java:comp/UserTransaction MYBATIS_DATASOURCE_KEY=MYBATIS_DATASOURCE MYBATIS_DATASOURCE=java:comp/env/jdbc/SigmaAppDataSource MYBATIS_QUERY_PREPROCESSOR=com.intellectdesign.canvas.mybtis.CanvasQueryFunctionProcessor ########################################################################################### # Maximum no of rows allowed in the system to retrive from the query. This will stop processing #expensive query data in the system in order maintain the stability ########################################################################################### QUERY_MAX_NO_OF_ROWS = ${env.QUERY_MAX_NO_OF_ROWS} ########################################################################################### # This is an integer to set the connection pool size for the dynamic database # connections created in studio. This will be used while initializing the PooledDataSource ########################################################################################### DYNAMIC_CONNECTION_POOL_SIZE = ${env.DYNAMIC_CONNECTION_POOL_SIZE} ########################################################################################### # The Data Source Default Network Timeout ########################################################################################### DATA_SOURCE_DEFAULT_NETWORK_TIMEOUT=${env.DATA_SOURCE_DEFAULT_NETWORK_TIMEOUT} ########################################################################################### # The Connection retry count ########################################################################################### CONNECTION_RETRY_COUNT=${env.CONNECTION_RETRY_COUNT} ############################################################################################################ # This is use to setting timer in milliseconds for connection retry ############################################################################################################ CONNECTION_RETRY_TIMER=${env.CONNECTION_RETRY_TIMER} ############################################################################################################ # This is use to enable Mybatis datasource pooling mechanism(Y/N), Default=Y ############################################################################################################ ENABLE_MYBATISDATASOURCE_POOLING=${env.ENABLE_MYBATISDATASOURCE_POOLING} ########################################################################################### # This is an integer to be set in seconds. This will terminate the statement execution after # the said time if the statement is still in execution. ########################################################################################### QUERY_TIMEOUT = ${env.QUERY_TIMEOUT}