This section describes the steps required to configure and deploy database stores.
Step1: Enable the database store feature in the tibemsd.conf by setting the parameters:
— dbstore_classpath
— dbstore_driver_name
— dbstore_driver_dialect
— jre_library
Here I configured for MySql database...
dbstore_classpath : specify the path of jar files needed for db configuration.(In the below tibemsd.conf file i mentioned all the jar files which are needed )
dbstore_driver_name
dbstore_driver_name = name
Specifies the name of the JDBC driver used by Hibernate.
For example:
• If you are using the MySQL InnoDB database server:
dbstore_driver_name=com.mysql.jdbc.Driver
• If you are using the Microsoft SQL Server:
dbstore_driver_name=
com.microsoft.sqlserver.jdbc.SQLServerDriver
• If you are using Oracle 10g:
dbstore_driver_name=oracle.jdbc.driver.OracleDriver
• If you are using IBM DB2 Server:
dbstore_driver_name=com.ibm.db2.jcc.DB2Driver
dbstore_driver_dialect
dbstore_driver_dialect = dialect
Specifies the Hibernate SQL dialect used to construct SQL commands.
then the configuration for tibemsd.conf file is look like below...
Server = EMS-SERVER-MSS-DB2
Listen = tcp://7123
########################################################################
use the following jar files what i mentioned in class_path,don't use any extra jar files,they lead to some more problems.
########################################################################
dbstore_classpath = <path>\hibernate3.jar;<path>\c3p0-0.9.1.jar;<path>\asm-attrs.jar;<path>\asm.jar;<path>\cglib-2.2.jar;<path>\commons-collections-2.1.1.jar;<path>\javassist.jar;<path>\commons-collections-3.1.jar;<path>\commons-logging-1.0.4.jar;<path>\dom4j-1.6.1.jar;<path>\ehcache-1.2.3.jar;<path>\slf4j-api-1.5.8.jar;<path>\apache-logging-log4j.jar;<path>\antlr-2.7.6.jar;<path>\jta-1.1.jar;<path>\slf4j-log4j12-1.5.8.jar;<path>\mysql-connector-java-5.1.15-bin.jar
dbstore_driver_name = com.mysql.jdbc.Driver
dbstore_driver_dialect = org.hibernate.dialect.MySQL5InnoDBDialect
jre_library = "C:\Program Files\Java\jdk1.7.0_07\jre\bin\server\jvm.dll"
######################################################
stores = C:\tibco\ems\7.0\bin\dbstore\stores.conf
####################################################
Step2:Configuration in stores.conf This section describes parameters configured for each database store in the stores.conf file. The stores.conf includes definitions for both database and file-based stores.
stores.conf file look like below...
[tibems]
type=dbstore
dbstore_driver_url=jdbc:mysql://localhost:3306/tibems
dbstore_driver_username=root
dbstore_driver_password=123456
Step3: EMS Schema Export Tool
Each database store that is configured for an EMS server includes a configuration parameter pointing to a database. The EMS Schema Export Tool creates and exports database tables for the database stores.
By using the below command you can export schema to Database...
CMD > java -jar c:\tibco\ems\7.0\bin\tibemsd_util.jar -tibemsdconf c:\tibco\ems\7.0\bin\dbstore\tibemsd.conf -createall -export
Step4:Testing the Messages Availability in Database
Step1: Enable the database store feature in the tibemsd.conf by setting the parameters:
— dbstore_classpath
— dbstore_driver_name
— dbstore_driver_dialect
— jre_library
Here I configured for MySql database...
dbstore_classpath : specify the path of jar files needed for db configuration.(In the below tibemsd.conf file i mentioned all the jar files which are needed )
dbstore_driver_name
dbstore_driver_name = name
Specifies the name of the JDBC driver used by Hibernate.
For example:
• If you are using the MySQL InnoDB database server:
dbstore_driver_name=com.mysql.jdbc.Driver
• If you are using the Microsoft SQL Server:
dbstore_driver_name=
com.microsoft.sqlserver.jdbc.SQLServerDriver
• If you are using Oracle 10g:
dbstore_driver_name=oracle.jdbc.driver.OracleDriver
• If you are using IBM DB2 Server:
dbstore_driver_name=com.ibm.db2.jcc.DB2Driver
dbstore_driver_dialect
dbstore_driver_dialect = dialect
Specifies the Hibernate SQL dialect used to construct SQL commands.
then the configuration for tibemsd.conf file is look like below...
Server = EMS-SERVER-MSS-DB2
Listen = tcp://7123
########################################################################
use the following jar files what i mentioned in class_path,don't use any extra jar files,they lead to some more problems.
########################################################################
dbstore_classpath = <path>\hibernate3.jar;<path>\c3p0-0.9.1.jar;<path>\asm-attrs.jar;<path>\asm.jar;<path>\cglib-2.2.jar;<path>\commons-collections-2.1.1.jar;<path>\javassist.jar;<path>\commons-collections-3.1.jar;<path>\commons-logging-1.0.4.jar;<path>\dom4j-1.6.1.jar;<path>\ehcache-1.2.3.jar;<path>\slf4j-api-1.5.8.jar;<path>\apache-logging-log4j.jar;<path>\antlr-2.7.6.jar;<path>\jta-1.1.jar;<path>\slf4j-log4j12-1.5.8.jar;<path>\mysql-connector-java-5.1.15-bin.jar
dbstore_driver_name = com.mysql.jdbc.Driver
dbstore_driver_dialect = org.hibernate.dialect.MySQL5InnoDBDialect
jre_library = "C:\Program Files\Java\jdk1.7.0_07\jre\bin\server\jvm.dll"
######################################################
stores = C:\tibco\ems\7.0\bin\dbstore\stores.conf
####################################################
Step2:Configuration in stores.conf This section describes parameters configured for each database store in the stores.conf file. The stores.conf includes definitions for both database and file-based stores.
stores.conf file look like below...
[tibems]
type=dbstore
dbstore_driver_url=jdbc:mysql://localhost:3306/tibems
dbstore_driver_username=root
dbstore_driver_password=123456
Step3: EMS Schema Export Tool
Each database store that is configured for an EMS server includes a configuration parameter pointing to a database. The EMS Schema Export Tool creates and exports database tables for the database stores.
By using the below command you can export schema to Database...
CMD > java -jar c:\tibco\ems\7.0\bin\tibemsd_util.jar -tibemsdconf c:\tibco\ems\7.0\bin\dbstore\tibemsd.conf -createall -export
Step4:Testing the Messages Availability in Database
- Start the EMS Server what you configured.
- Connect to the server from administration tool.
- Create Queue with specifying store parameter.
- Example: create queue testqueue store=tibems(store what i mentioned in stores.conf file)
- Send the message to the Queue in persistant mode then the message is also available in ems_messages table.
- Need any clarification contact me ...
No comments:
Post a Comment