Mostrando entradas con la etiqueta BonitaBPM. Mostrar todas las entradas
Mostrando entradas con la etiqueta BonitaBPM. Mostrar todas las entradas

miércoles, 18 de diciembre de 2013

Install BonitaBPM Community 6.1.1 on JBoss AS 7.1.1

Installation

  • Download JBoss AS 7.1.1 from JBoss site.
    • I downloaded jboss-as-7.1.1.Final.zip file
  • Download BonitaBPM 6.1.1 from BonitaSoft site
    • I downloaded the Bonita BPM Deployment bundle for JBoss 5.1 (BonitaBPMCommunity-6.1.1-JBoss-5.1.0.GA.zip file)

    Note: you can download all the configuration files listed in this tutorial here

  • Unzip the jboss-as-7.1.1.Final.zip into a folder. In this tutorial I use: c:\opt\jboss-as-7.1.1.Final. This folder will be called as $JBOSS_HOME
  • Unzip the BonitaBPMCommunity-6.1.1-JBoss-5.1.0.GA.zip. In this tutorial I use: c:\opt\BonitaBPMCommunity-6.1.1-JBoss-5.1.0.GA.

  • Configuration

  • Copy the folder: "c:\opt\BonitaBPMCommunity-6.1.1-JBoss-5.1.0.GA\bonita" into $JBOSS_HOME.
  • Create the user (and schema) to Bonita in Oracle. Execute the following script (you must be logged as sysdba)
  • DROP user bonita cascade;
    CREATE USER bonita IDENTIFIED BY bonita;
    GRANT connect, resource TO bonita IDENTIFIED BY bonita;
    GRANT select ON sys.dba_pending_transactions TO bonita;
    GRANT select ON sys.pending_trans$ TO bonita;
    GRANT select ON sys.dba_2pc_pending TO bonita;
    GRANT execute ON sys.dbms_system TO bonita;
    

    Note: BonitaBPM requires 2 datasources to run correctly. See http://documentation.bonitasoft.com/database-overview for details.

  • Create a module in jboss for Oracle JDBC driver. see this tutorial
  • Add the Oracle XA driver in standalone.xml file (added within the tag in subsystem: )
  • <driver module="com.oracle.driver" name="oracle">
          <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    </driver>
    
  • Create the bonita XA datasource. Add the following XML, modifying the text in bold, in the subsystem: in standalone.xml:
  • <xa-datasource enabled="true" jndi-name="java:/bonitaDS" pool-name="bonitaDS" use-ccm="false">
      <xa-datasource-property name="URL">
       jdbc:oracle:thin:@localhost:1521:orcl
      </xa-datasource-property>
      <driver>oracle</driver>
      <xa-pool>
       <is-same-rm-override>false</is-same-rm-override>
       <interleaving>false</interleaving>
       <pad-xid>false</pad-xid>
       <wrap-xa-resource>false</wrap-xa-resource>
      </xa-pool>
      <security>
       <user-name>bonita</user-name>
       <password>bonita</password>
      </security>
      <validation>
       <validate-on-match>false</validate-on-match>
       <background-validation>false</background-validation>
      </validation>
      <statement>
       <share-prepared-statements>false</share-prepared-statements>
      </statement>
     </xa-datasource>
    
  • Create the sequenceManager datasource. Add the following XML, modifying the text in bold, in the subsystem: in standalone.xml:
  •  <datasource enabled="true" jndi-name="java:/bonitaSequenceManagerDS" jta="false" pool-name="bonitaSequenceManagerDS" use-ccm="false">
      <connection-url>jdbc:oracle:thin:@localhost:1521:orcl</connection-url>
      <driver-class>oracle.jdbc.OracleDriver</driver-class>
      <driver>oracle</driver>
      <security>
       <user-name>bonita</user-name>
       <password>bonita</password>
      </security>
      <validation>
       <validate-on-match>false</validate-on-match>
       <background-validation>false</background-validation>
      </validation>
      <statement>
       <share-prepared-statements>false</share-prepared-statements>
      </statement>
     </datasource>
    
  • Edit the bonita-platform.properties file located in $ JBOSS_HOME/server/platform/conf and replace the following entries:
  •  database.journal.datasource.name=${sysprop.bonita.database.journal.datasource.name:java:/bonitaDS}
     database.sequence.manager.datasource.name=${sysprop.bonita.database.sequence.manager.datasource.name:java:/bonitaSequenceManagerDS}
    
     db.vendor = oracle
    
     transaction.manager=${sysprop.bonita.transaction.manager:java:/TransactionManager}
     userTransaction=${sysprop.bonita.userTransaction:java:jboss/UserTransaction}
    
  • Copy the file c:\opt\BonitaBPMCommunity-6.1.1-JBoss-5.1.0.GA\server\default\deploy\bonita-all-in-one-6.1.1.ear to $JBOSS_HOME\standalone\deployments
  • Modify the startup script (in my case as I am under Windows, the file is $ JBOSS_HOME\bin\standalone.conf.bat).
    • Replace:
      set "JAVA_OPTS =-Xmx512M-Xms64m-XX: MaxPermSize = 256M"
      by:
      set "JAVA_OPTS =-Xmx1024M-Xms1024m-XX: MaxPermSize = 256M-XX: + HeapDumpOnOutOfMemoryError"
      The following lines are added:
       set "BONITA_OPTS=-Dbonita.home=C:\opt\jboss-as-7.1.1.Final\bonita"
       set "JAVA_OPTS=%JAVA_OPTS% %BONITA_OPTS%"
       goto :eof
      
  • Edit the file $ JBOSS_HOME/bonita/server/platform/conf/services/cfg-bonita-persistence-hibernate.xml, adding the following property in the bean: (line 27)
  •  <prop key="jta.UserTransaction">${userTransaction}</prop>
    
  • Startup the server with $ JBOSS_HOME/bin/standalone.bat
  • Go to: http://localhost:8080/bonita