Virtualization and Replication configuration in JBoss

<< Click to Display Table of Contents >>

Navigation:  Bizagi Engine > Bizagi system administration > Bizagi server configuration > Bizagi Engine JEE platform configuration > Setting up the system architecture > Configuring Replication or Virtualization >

Virtualization and Replication configuration in JBoss

Overview

The procedure presented in this section illustrates how to configure external data sources in a JEE Application server, for a Test or Production Bizagi environment.

 

This is only required if your Bizagi project uses the Data Virtualization or Data Replication integration features.

 

This step is not required in the Development environment of your Bizagi project, because Bizagi automatically configures the integrated data sources at the JBoss Server it bundles.

 

Prerequisites

Before moving on, ensure that you have already configured your JEE Application server to work with Bizagi.

To review this prerequisite, refer to JBoss configuration to work with Bizagi.

 

You also require to have ensured and verified that your set Virtualization or Replication works as expected in the Development environment.

 

 

What you need to do

To configure Virtualization or Replication in your JEE Application server, you need to configure the data source. This can be performed by: Configuring an external file where all the connections will be configured or Configuring the data sources in the standalone.xml file.

 

 

Example

The following example shows how to configure Virtualization and Replication in a JBoss Production or Test environment. In both, you need to change the connection URL of your main data source. Therefore, open the standalone.xml file located in <JBOSS_HOME>/standalone/configuration and find the tag <datasource jta="true" jndi-name="java:/BizAgiJava" pool-name="BizAgiJava" enabled="true" use-ccm="true">.

 

Configuring an external file

This step requires to add the external source where each connection to database are configured. To create the external file, use the template bizagidriver_datasource_template.xml located in <BIZAGI_HOME>\BizagiConsoleManagerJEE\config\templates\JDBC_Driver folder.

 

VRJEE03_DS_Template

 

Remove the comments in this file and fill the following tags per each data source:

 

providerName: Provider name configured in Bizagi Studio.

dataSourceName: Data source name.

mainDS: this attribute is optional and indicates whether this data source is the main data source (Bizagi database data source), its default value is false.

containerManager: indicates whether the connections will be managed by Bizagi (value: false) or by the container (value: true).

transactional: indicates whether this data source is transactional. Default value is true.

customProperties: This tag will have the data to create the connections. This tag contains the following structure.

<entry>

 <key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">user</key>

 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">[userLogin]</value>        

</entry>

<entry>

 <key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">password</key>

 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">[userLoginPassword]</value>        

</entry>

<entry>

 <key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">url</key>

 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">[connectionURL]</value>        

</entry>

<entry>

 <key xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">driverclass</key>

 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">[driverClass]</value>        

</entry>

 

Edit the previous lines according with the following values:

 

[userLogin]: The user for the database.

[userLoginPassword]: The password for this database user.

[connectionURL]: The connection string to the external data source.

[driverClass]: The registered driver of the external data source

 

For ORACLE databases:

 

The driver class should be:

oracle.jdbc.driver.OracleDriver

 

The connection string should be as:

jdbc:oracle:thin:@//[databaseServer]:[servicePort]/[serviceName]

 

For SQL Server databases:

 

The driver class should be:

com.microsoft.sqlserver.jdbc.SQlServerDriver

 

The connection string should be as:

jdbc:sqlserver://[databaseServerInstance]:[instancePort];databaseName=[SQLdatabase]

 

In which:

 

[databaseServer]: The name of the Oracle database server or The name of the SQL Server database server, and instance if it is a named instance.

[servicePort]: The port number on which Oracle or SQL Server database listens to.

[serviceName]: The database instance's service id. (For oracle)

[SQLdatabase]: The name of Bizagi's project which corresponds to the database name. (For SQL Server)

 

Save the file in an available location and add the full path to the tag <connection-url> in the standalone.xml file, this tag now will be like this:

<connection-url>jdbc:bizagi:mainDS=@url=[ExternalFile]</connection-url>

 

At the end of the step, your file should look like this:

 

VRJEE04_DS_File

 

Configuring the data sources in the standalone.xml file

In this step, all data sources are added to the existing "BizAgiJava" data source, this option creates a single connection string with each provider (Main ans externals).

 

The value for the <connection-url> tag, should be replaced with the following connection string:

 

jdbc:bizagi:mainDS=BTDS#user@[userLogin]:password[userLoginPassword]:url@"[connectionURL]":[driverClass]#:external={[prov1]:[prov1ConMan]:user@[prov1user]:password@[prov1Password]:url@"[prov1connectionURL]":driverclass@[prov1DriverClass]};{[prov2]:[prov2ConMan]:user@[prov2user]:password@[prov2Password]:url@"[prov2connectionURL]":driverclass@[prov2DriverClass]};...;{[provN]:[prov1ConMan]:user@[provNuser]:password@[provNPassword]:url@"[provNconnectionURL]":driverclass@[provNDriverClass]}

 

Edit the connection string according with the following values:

 

[userLogin]: The user for the database.

[prov(1...N)]: The provider for the external data source.

[prov(1..N)user]: The user for each external database.

[userLoginPassword]: The password for this database user.

[[prov(1..N)Password]: The password for each external database user.

[prov(1...N)ConMan]: Indicates whether the connections will be managed by Bizagi or by the container. Add BTDS (Bizagi Transactional Data Source) if the connection will be managed by Bizagi and BNTDS (Bizagi Non Transactional Data Source) otherwise.

[connectionURL]: The connection string to the main data source.

[prov(1...N)connectionURL]: The connection string to the external data source.

[driverClass]: The registered driver of the main data source.

[prov(1...N)driverClass]: The registered driver of the external data source.

 

 

For ORACLE databases:

 

The driver class should be (Main or External):

oracle.jdbc.driver.OracleDriver

 

The connection string should be as (Main or External):

jdbc:oracle:thin:@//[databaseServer]:[servicePort]/[serviceName]

 

For SQL Server databases:

 

The driver class should be (Main or External):

com.microsoft.sqlserver.jdbc.SQlServerDriver

 

The connection string should be as (Main or External):

jdbc:sqlserver://[databaseServerInstance]:[instancePort];databaseName=[SQLdatabase]

 

In which:

 

[databaseServer]: The name of the Oracle database server or The name of the SQL Server database server, and instance if it is a named instance.

[servicePort]: The port number on which Oracle or SQL Server database listens to.

[serviceName]: The database instance's service id. (For oracle)

[SQLdatabase]: The name of Bizagi's project which corresponds to the database name. (For SQL Server)

 

At the end of the process, the "BizAgiJava" data source should look like this:

 

VRJEE05_StandaloneFile

 

At the end of any of the previous processes, the last step is to change the driver of the "BizAgiJava" data source. Replace the <driver> tag with the following line:

<driver>BIZAGI</driver>

 

Using the JDataSource property (applies to Replication)

If you are using replication, take into account that you need to specify the JDataSource property for the provider through the systems module.

 

This can be done from the Management Console directly:

 

VRJEE02_JDataSource

 

Notice that the value for this property should correspond to the name for the [externalDS] in the previously edited file.