Enabling RDBMS
By default, RDBMS Support is turned Off. To enable RDBMS, perform the following steps:
- Open the profile for offline editing through the Profile Manager using Studio as explained in section HA Configurations.
- Navigate to bean Fiorano > etc > RdbmsManager and enable the property EnableRdbms.
3. Edit the configuration specifying the JDBC parameters for the database. (A sample configuration for some common databases can be found in Sample Configuration section below)
4. Right-click on the FioranoMQ node and select Save from the pop-up menu.
Sample Configuration
DB2
URL: jdbc:db2://<DBServer>:6789/sample
JdbcDriver: COM.ibm.db2.jdbc.net.DB2Driver
Username: <username>
Password: <password>
PropertiesFilename: jdbc_db2.cfg
MaxConnections: 200
Oracle
URL: jdbc:oracle:thin:@<machine Ip>:1521:<sid>
JdbcDriver: oracle.jdbc.driver.OracleDriver
Username: <username>
Password : <password>
PropertiesFilename: jdbc_oracle.cfg
MaxConnections: 200
MSSQL
URL: jdbc:microsoft:sqlserver://<machineName>:1433;SelectMethod=Cursor;databaseName=<database_name>
If the server driver in use is the Microsoft SQL 2005 or later, the URL is
URL: jdbc:sqlserver://<machineName>:1433;SelectMethod=Cursor;databaseName=<database_name>
JdbcDriver: com.microsoft.jdbc.sqlserver.SQLServerDriver
If the server driver in use is the Microsoft SQL 2005 or later, the JdbcDriver is:
JdbcDriver: com.microsoft.sqlserver.jdbc.SQLServerDriver
Username: <username>
Password: <password>
PropertiesFilename: jdbc_mssqls.cfg
MaxConnections: 200
MySQL
URL: jdbc:mysql://localhost/mysql
JdbcDriver: com.mysql.jdbc.Driver
Username: <username>
Password: <password>
PropertiesFilename: jdbc_mysqls.cfg
MaxConnections: 200
Cloudscape
URL: jdbc:cloudscape:mydb;create=true
JdbcDriver : COM.cloudscape.core.JDBCDriver
Username: <username>
Password: <password>
PropertiesFilename: jdbc_cloudscape.cfg
MaxConnections: 200
Additional Configuration
The Database Driver used should be made available in the classpath when launching the server. This can be done by editing the respective configuration files in launch scripts - that is, fmq\bin\fmq.conf, fmq\bin\ClearDB.conf, and fmq\bin\create-database.conf, respectively.
Creating a Default Database
FioranoMQ comes with a script (fmq/bin/ create-database) that allows the creation of a default database for the server. This script accepts input from the database in the following ways:
- Through the command line parameters
- Through a pre-configured Fiorano Profile
Command Line Parameters
The following command lines are accepted through the create-database script
- driver: This parameter specifies the class name of the driver class for the database.
- url: This parameter specifies the URL of the database.
- username: This parameter specifies the login name of the User that the database script uses to connect to the database.
- password: This parameter specifies the Password of the User that the database script uses to connect to the database.
- dataTypesFileName: This parameter specifies the complete path name of the file that contains the mapping of the Java data 'types' to SQL data 'types'. Please see the Sample configuration section above to know the complete property file name for a specific database. If a different database is being used, please send a mail to presales@fiorano.com.
- databaseType: This parameter specifies the name of the database being used. Valid database 'types' include oracle, mssql, mysql, db2, and cloudscape. If a different database is being used, please send a mail to presales@fiorano.com.
Pre-configured Profile
Configure the server to enable RDBMS as explained in Enabling RDBMS section.
Run the create-database script and specify the profile directory. Enter the 'type' of the database being used.
Profile Directory is relative to the profiles directory.
If the profile is not specified, the default profile FioranoMQ is used.
Creating a Destination on RDBMS
FioranoMQ provides the option to configure the store of a destination and set it to either a File-based or an RDBMS based database.
The administrator is free to use both databases by creating destinations on Files and on RDBMS. To create RDBMS based destinations, follow the steps below:
- Launch Studio and right-click on the FMQ server node to select the server. Select Login from the pop-up menu.
- To create a new destination, navigate to the Destinations node.
- Select 'Queue' or on 'Topic' from the Name drop-down and select Storage Type as "RDBMS Based Database".
4. Click on the OK button.