此内容没有您所选择的语言版本。
3.2. The generic deployable bundle installation
To install Red Hat JBoss BPM Suite on Red Hat JBoss Web Server (WS) , you need to use the generic deployable package of the product.
For installation on WS, the generic deployable package contains additional transaction manager and security libraries that are not part of Red Hat JBoss WS.
Note that the generic deployable package contains the following zip archives:
jboss-bpms-engine.zip: supported execution engine libraries needed if you are embedding the engine into your applicationjboss-bpms-manager.zip: thebusiness-central.waranddashbuilder.warweb applications
3.2.1. Downloading the generic deployable package 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To download the generic deployable Red Hat JBoss BPM Suite package for JBoss Web Server, do the following:
- Go to the Red Hat Customer Portal and log in.
- Select
. - From the list of products click on Red Hat JBoss BPM Suite.
- From the Version drop-down menu, select version 6.0.3.
- In the Software Downloads section that comes up, navigate to the Red Hat JBoss BPM Suite 6.0.3 Deployable for all supported containers row and then click Download.
3.2.2. Installing the generic deployable package 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
To install the generic deployable package, you need to set up the following after you have installed the underlying platform (Red Hat JBoss WS):
- Set up the database driver and the transaction manager (Bitronix) (refer to Section 3.2.2.1, “Setting up transaction manager for Red Hat JBoss Web Server 2.0 (Tomcat 7)”).
- Set up the Business Central application: set up users and roles and set up persistence (refer to Section 3.2.2.2, “Setting up Business Central for Red Hat JBoss Web Server 2.0 (Tomcat 7)”).
- Set up the Dashbuilder application: set up users and roles and set up persistence (refer to Section 3.2.2.3, “Setting up Dashbuilder for Red Hat JBoss Web Server 2.0 (Tomcat 7)”).
- Extract the generic deployable zip package you downloaded from Red Hat Customer Portal. This zip package contains two more zip files:
jboss-bpms-engine.zipandjboss-bpms-manager.zip. - Extract the contents of the
jboss-bpms-manager.zipfile to a temporary location. This zip file contains two web application archive folders:business-central.waranddashbuilder.warin exploded formats and these are now in your temporary location. Rename these folders to remove the.warextension.Copy both these folders directly under the$TOMCAT_DIR/webappsfolder.You should end up with two folders in exploded format:$TOMCAT_DIR/webapps/business-centraland$TOMCAT_DIR/webapps/dashbuilder.Note
$TOMCAT_DIR stands for the home directory where your web server is located. Replace it with the actual path to your web server home directory, for example:/home/john/jboss-ews-2.0/tomcat7/ - Extract the
jboss-bpms-enginefolder from thejboss-bpms-engine.ziparchive to a temporary location from where you can copy the required libraries. This folder now contains all the core BPMS libraries under the extracted folder and alibfolder. Install the transaction manager.
Warning
Please note that the following section describes the setup of a transaction manager, Bitronix that is not officially supported by Red Hat.Copy the following transaction manager jar libraries from thelibfolder where you just extracted thejboss-bpms-enginelibraries to$TOMCAT_DIR/lib/directory:- btm-VERSION.jar
- btm-tomcat55-lifecycle-VERSION.jar
- jta-VERSION.jar
- slf4j-api-VERSION.jar
- slf4j-ext-VERSION.jar
In addition, download the following library and copy it into the$TOMCAT_DIR/lib/folder as well:- Install the driver to your database: copy the jar file with the relevant database driver to
$TOMCAT_DIR/lib/.Note
If using the embedded H2 database, the driver is available inbusiness-central/WEB-INF/lib/. - Create the transaction manager configuration files in
$TOMCAT_DIR/conf/:- btm-config.properties
bitronix.tm.serverId=tomcat-btm-node0 bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog bitronix.tm.resource.configuration=${btm.root}/conf/resources.propertiesbitronix.tm.serverId=tomcat-btm-node0 bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog bitronix.tm.resource.configuration=${btm.root}/conf/resources.propertiesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - resources.properties (the resource.ds1.uniqueName defines the datasource name used in tomcat resource definition later - make a note of this value).Make sure to change the values in the following definitions to match your environment.
Example 3.2. H2 datasource definition
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 3.3. MySQL 5.5 datasource definition
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 3.4. DB2 Type 4 datasource definition
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 3.5. Oracle datasource definition
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 3.6. Microsoft SQL Server datasource definition
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Set up the transaction manager listener in
$TOMCAT_DIR/conf/server.xmlto start and stop Bitronix on container startup and shutdown:Add the following element as the last <Listener> element into the <Server> element:<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Define the btm.root system property and location where bitronix config file is placed:In
$TOMCAT_DIR/bin/, create thesetenv.shfile with the following content:CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry"
CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry"Copy to Clipboard Copied! Toggle word wrap Toggle overflow The propertyorg.jbpm.designer.perspectiveis set toRuleFlowto allow the default perspective for the designer to beRuleFlowrather thanFull. Grant the file execute permissions if applicable.Important
On Microsoft Windows systems, replace the$CATALINA_HOMEvalue in the content of the file with the equivalent environment variable name or use the absolute path and add the values insetenv.batfile as shown here in the following example:set "CATALINA_OPTS=-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=C:/Tomcat -Dbitronix.tm.configuration=C:/Tomcat/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow"
set "CATALINA_OPTS=-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=C:/Tomcat -Dbitronix.tm.configuration=C:/Tomcat/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
To set up Business Central, do the following:
- Set up a
Valveso that the Business Central web application can load the users set up in Tomcat:- Define users and roles in
$TOMCAT_DIR/conf/tomcat-users.xml. Note that Business Central requires users to have the roles specified asadminand/oranalyst(for more information about user and role definitions, refer to the Tomcat 7 documentation).The program listing below shows an example of how these two roles would be added and how a user namedbpmsadminwill be assigned these roles.<role rolename="admin"/> <role rolename="analyst" /> <user username="bpmsadmin" password="P@ssw0rd" roles="admin,analyst"/>
<role rolename="admin"/> <role rolename="analyst" /> <user username="bpmsadmin" password="P@ssw0rd" roles="admin,analyst"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy
kie-tomcat-integration-VERSION.jarfrom$TOMCAT_DIR/webapps/business-central/WEB-INF/lib/to$TOMCAT_DIR/lib/. - Copy
jaxb-api-VERSION.jarfrom$TOMCAT_DIR/webapps/business-central/WEB-INF/lib/to$TOMCAT_DIR/lib/. - In
$TOMCAT_DIR/conf/server.xml, add the Tomcat Valve declaration in the relevant <host> element:<Valve className="org.kie.integration.tomcat.JACCValve" />
<Valve className="org.kie.integration.tomcat.JACCValve" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In
$TOMCAT_DIR/webapps/business-central/WEB-INF/web.xml, uncomment entries marked with theTOMCAT-JEE-SECURITYcomments. - Set up the tomcat authentication source: in the
$TOMCAT_DIR/webapps/business-central/WEB-INF/classes/META-INF/services/directory, rename the following files:org.uberfire.security.auth.AuthenticationSourcetoorg.uberfire.security.auth.AuthenticationSource-ORIGINandorg.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITYtoorg.uberfire.security.auth.AuthenticationSource:Example command if you run this from $TOMCAT_DIR/webapps directory mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-ORIGIN mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource
# Example command if you run this from $TOMCAT_DIR/webapps directory $ mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-ORIGIN $ mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In
$TOMCAT_DIR/webapps/business-central/WEB-INF/beans.xml, uncommentJAASUserGroupInfoProducerand commentorg.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer(optional). Thealternativespart of this file should now look like this:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- If you are using a datasource other than the default provided by the underlying H2 database, you will need to setup persistence. If you are using the default H2 database, then you can ignore the rest of the steps in this procedure.In this procedure, you configure a datasource with the JNDI name
jdbc/myDatasourceas defined in uniqueName=jdbc/jbpm in the bitronixresources.propertiesfile earlier (for the MySQL option).- In
business-central/META-INF/context.xml, replace the datasource JNDI name in the <Resource> element. The uniqueName attribute refers to the resource.ds1.uniqueName property set inresources.properties:<Resource name="jdbc/myDatasource" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>
<Resource name="jdbc/myDatasource" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In
business-central/WEB-INF/web.xml, replace the datasource JNDI name in the <res-ref-name> element with your datasource name:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Change
business-central/WEB-INF/classes/META-INF/persistence.xml.In this file, change the name of the hibernate dialect used for your database, if using a different database other than H2. The code below demonstrates the original database information forpersistence.xml:<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow This information can be updated in the following manner (as demonstrated with MySQL database below):<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
The dialect for DB2 isorg.hibernate.dialect.DB2Dialect, for DB2 on AS/400 isorg.hibernate.dialect.DB2400Dialect, for Oracle isorg.hibernate.dialect.Oracle10gDialectand for Microsoft SQL Server isorg.hibernate.dialect.SQLServerDialect - Change
business-central/WEB-INF/classes/META-INF/persistence.xmlfile so that BPMS process engine can use the new database.The code below demonstrates the original datasource information forpersistence.xml:<jta-data-source>java:comp/env/jdbc/jbpm</jta-data-source>
<jta-data-source>java:comp/env/jdbc/jbpm</jta-data-source>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Change this value to the datasource defined earlier:<jta-data-source>java:comp/env/jdbc/myDatasource</jta-data-source>
<jta-data-source>java:comp/env/jdbc/myDatasource</jta-data-source>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- You can now start the JBoss Web Server to login to Business Central.
- Run
startup.shin the $TOMCAT_HOME/bindirectory../startup.sh
./startup.shCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Navigate to http://localhost:8080/business-central in a web browser.
- Login with the correct username/password as given in the
tomcat-users.xmlfile where you defined user roles.
To set up Dashbuilder on Red Hat JBoss Web Server, do the following:
- Define users and roles in
$TOMCAT_DIR/conf/tomcat-users.xml. Note that Dashbuilder requires users to have the role specified asadminand/oranalyst. If you have already defined these users earlier for Business-Central, you don't need to define them again. - Enable single sign-on between Dashbuilder and Business Central by uncommenting the following lines in
$TOMCAT_DIR/conf/server.xmlfile:<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - As with Business Central setup, if you are using a database other than the default and integrated H2 database, you will need to setup persistence.In this procedure, you configure a datasource with the JNDI name
jdbc/dashbuilderDSas defined in uniqueName=jdbc/jbpm in the bitronixresources.propertiesfile:- In
dashbuilder/META-INF/context.xml, replace the datasource JNDI name in the <Resource> element. The uniqueName attribute refers to the resource.ds1.uniqueName property set inresources.properties:<Resource name="jdbc/dashbuilderDS" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>
<Resource name="jdbc/dashbuilderDS" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Depending upon your database, you may need to define some other properties here as well. For example, in an Oracle environment, this entry may look like the following listing.<Resource name="jdbc/jbpm" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" username="username" password="password" driverClassName="oracle.jdbc.xa.client.OracleXADataSource" url="jdbc:oracle:thin:YOUR-URL:1521:YOUR-DB" maxActive="8" />
<Resource name="jdbc/jbpm" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" username="username" password="password" driverClassName="oracle.jdbc.xa.client.OracleXADataSource" url="jdbc:oracle:thin:YOUR-URL:1521:YOUR-DB" maxActive="8" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In
dashbuilder/WEB-INF/web.xml, add the datasource JNDI name in the <res-ref-name> element with your datasource name:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In
dashbuilder/META-INF/context.xml, define the transaction factory:<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>
<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the datasource JNDI name in
dashbuilder/WEB-INF/etc/hibernate.cfg.xmlin the <session-factory> element:<property name="connection.datasource">java:/comp/env/jdbc/dashbuilderDS</property>
<property name="connection.datasource">java:/comp/env/jdbc/dashbuilderDS</property>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Restart Java Web server for these changes to take effect. Once restarted, you can navigate to Dashbuilder from within Business Central or directly via:
http://localhost:8080/dashbuilder.