Friday, November 14, 2014

Installing Red Hat JBoss BPM Suite 6 on JBoss EAP-6.1.1 standalone and config MySQL Datasource




  1. Download EAP-6.1.1 fro Red Hat Customer Portal
    https://access.redhat.com/downloads/
  2. Unzip the downloaded EAP-6.1.1 to your choice of location in your hard drive, Installation location will be your SERVER_HOME(eg, /home/{user_name}/{folder name}/jboss-eap-6.1).
  3. Download BPM Suite 6 from Red Hat Customer Portal
    https://access.redhat.com/downloads/
  4. Unzip downloaded bpm suite and copy the following directories into your local installation of EAP 6.1 (SERVER_HOME):
  • bin
  • domain
  • modules
  • standalone
  1. Change directory (cd) to your SERVER_HOME/standalone/configuration folder
  2. Open the standalone.xml and locate the datasources subsystem (<subsystem xmlns="urn:jboss:domain:datasources:1.1">) and add the following subsystem for mysql
            <subsystem xmlns="urn:jboss:domain:datasources:1.1">
                <datasources>
                    <datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="jbpmDS" enabled="true" use-java-context="true">
                        <connection-url>jdbc:mysql://localhost:3306/jbpm</connection-url>
                        <driver>mysql</driver>
                        <security>
                            <user-name>{username}</user-name>
                            <password>{password}</password>
                        </security>
                    </datasource>
                    <drivers>
                        <driver name="mysql" module="com.mysqldatabase.mysql">
                            <driver-class>com.mysql.jdbc.Driver</driver-class>
                            <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
                        </driver>
                    </drivers>
                </datasources>
            </subsystem>

  3. Move to SERVER_HOME/modules/system/layers/base/com
  4. Create new folder mysqldatabase/mysql/main (eg,SERVER_HOME/modules/system/layers/base/com/mysqldatabase/mysql/main)
  5. Create module.xml file with following data
<module xmlns="urn:jboss:module:1.1" name="com.mysqldatabase.mysql">

    <properties>
        <property name="jboss.api" value="unsupported"/>
    </properties>

    <resources>
        <resource-root path="mysql-connector-java-5.1.31-bin.jar"/>
        <!-- Insert resources here -->
    </resources>
    <dependencies>
    <module name="javax.api" />
    <module name="javax.mail.api" />
    <module name="javax.servlet.api" />
    <module name="javax.servlet.jsp.api" />
    <module name="javax.transaction.api" />
    </dependencies>
</module>

  1. Download mysql  jdbc driver (eg,mysql-connector-java-5.1.31-bin.jar) and put into this location
  2. Move to SERVER_HOME/standalone/deployments/business-central.war/WEB-INF
  3. Open jboss-deployment-structure.xml and add the following line
    <module name="com.mysqldatabase.mysql" export="true" services="import" meta-inf="import"/
  4. Move to SERVER_HOME/standalone/deployments/business-central.war/WEB-INF/classes/META-INF
  5. Open persistence.xml
  6. Update the datasource name, make sure this is the same name you created in the standalone.xml datasource name in step6
    <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
  7. Replace the default h2 dialect information with the following code
    <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
    ...
    ...
    </properties>
  8. Move to SERVER_HOME/standalone/deployments/dashbuilder.war/WEB-INF
  9. Open jboss-deployment-structure.xml and add the the following code..
    <deployment>
    <dependencies>
    <module name="com.mysqldatabase.mysql" export="true" services="import" meta-inf="import"/
....

..

</dependencies>

<deployment>
  1. Open jboss-web.xml and update the jndi name, make sure this is the same name you created in the standalone.xml datasource name in step6 ...
    <jndi-name>java:jboss/datasources/jbpmDS</jndi-name>
  2. Make sure you save those above mentioned files as you modified.
  3. At this point your are done with all the settings, this is the time to test your installation
  4. Start the EAP sever
    SERVER_HOME/bin/./standalone.sh
  5. Open your browser and enter the following url..
  6. Now you can view the Red Hat JBoss BPM Suite Business Central.

Installing Red Hat JBoss BPM Suite 6 on JBoss EAP-6.1.1 standalone and config Oracle11g Datasource




  1. Download EAP-6.1.1 from Red Hat Customer Portal
    https://access.redhat.com/downloads/
  2. Unzip the downloaded EAP-6.1.1 to your choice of location in your hard drive, Installation location will be your SERVER_HOME(eg, /home/{user_name}/{folder name}/jboss-eap-6.1).
  3. Download BPM Suite 6 from Red Hat Customer Portal
    https://access.redhat.com/downloads/
  4. Unzip downloaded bpm suite and copy the following directories into your local installation of EAP 6.1 (SERVER_HOME):
  • bin
  • domain
  • modules
  • standalone
  1. Change directory (cd) to your SERVER_HOME/standalone/configuration folder
  2. Open the standalone.xml and locate the datasources subsystem (<subsystem xmlns="urn:jboss:domain:datasources:1.1">) and add the following subsystem for oracle 11g
     <subsystem xmlns="urn:jboss:domain:datasources:1.1">
       <datasources>
         <datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="jbpmDS" enabled="true" use-java-context="true">
            <connection-url>jdbc:oracle:thin:@//{host_name}:{port}/{service_name}</connection-url>
             <driver>oracle</driver>
                 <security>
                   <user-name>oracleuser</user-name>
                   <password>oracleuser_password</password>
                 </security>
          </datasource>
          <drivers>
             <driver name="oracle" module="com.oracle.ojdbc6">
             <driver-class>oracle.jdbc.OracleDriver</driver-class>
             <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

             </driver>
          </drivers>
     </datasources>
  3. Move to SERVER_HOME/modules/system/layers/base/com
  4. Create new folder oracle/ojdbc{x}/main (eg,SERVER_HOME/modules/system/layers/base/com/oracle/ojdbc6/main)
  5. Create module.xml file with following data
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc6">

<properties>

<property name="jboss.api" value="unsupported"/>

</properties>



<resources>

<resource-root path="ojdbc6.jar"/>

<!-- Insert resources here -->

</resources>

<dependencies>

<module name="javax.api" />

<module name="javax.mail.api" />

<module name="javax.servlet.api" />

<module name="javax.servlet.jsp.api" />

<module name="javax.transaction.api" />

</dependencies>

</module>
  1. Download oracle jdbc driver (eg,ojdbc6.jar) and put into this location
  2. Move to SERVER_HOME/standalone/deployments/business-central.war/WEB-INF
  3. Open jboss-deployment-structure.xml and add the following line
    <module name="com.oracle.ojdbc6" export="true" services="import" meta-inf="import"/>
  4. Move to SERVER_HOME/standalone/deployments/business-central.war/WEB-INF/classes/META-INF
  5. Open persistence.xml
  6. Update the datasource name, make sure this is the same name you created in the standalone.xml datasource name in step6
    <jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source>
  7. Replace the default h2 dialect information with the following code
    <properties>
    <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
    ...
    ...
    </properties>
  8. Move to SERVER_HOME/standalone/deployments/dashbuilder.war/WEB-INF
  9. Open jboss-deployment-structure.xml and add the the following code..
    <deployment>
              <dependencies>
             <module name="com.oracle.ojdbc6" export="true" services="import" meta-inf="import"/>

....

..

</dependencies>
     <deployment>
  1. Open jboss-web.xml and update the jndi name, make sure this is the same name you created in the standalone.xml datasource name in step6 ...
    <jndi-name>java:jboss/datasources/jbpmDS</jndi-name>
  2. Make sure you save those above mentioned files as you modified.
  3. At this point your are done with all the settings, this is the time to test your installation
  4. Start the EAP sever
    SERVER_HOME/bin/./standalone.sh
  5. Open your browser and enter the following url..
  6. Now you can view the Red Hat JBoss BPM Suite 6 Business Central in your browser.