Shark Workflow Research 1-jspclient example of deploying Shark workflow on Tomcat6 ____js

Source: Internet
Author: User
Tags auth

Shark Workflow is a well-known Open-source workflow engine that follows the WFMC standard and is a good example of learning workflow product development and use. But because it is open source projects, not very good documentation and technical support, for beginners do not know how to start. Shark provides a sample Web application jspclient that can serve as a starting point for learning. But I've been experimenting with the discovery that it's not successful to deploy on TOMCAT5 and TOMCAT6. After careful study and find data, it was found that some of the configuration files were not updated in time. Now I have summed up the process of deploying this program on the TOMCAT6 release, hoping to give some help to other beginners.

1. Get the Jspclient sample file

The easiest way to download the JSP client sample file directly to http://forge.objectweb.org/projects/shark/. or download the latest version of shark, or download the CVS source code itself compiled and installed, in the latter two cases will be in the shark of the final installation directory to find a jspclient directory, which has a Sharkworklisthandler.war file is the sample file.

2. Deployment of Jspclient

Unzip the Sharkworklisthandler.war file to the WebApps directory of Tomcat (I'm using tomcat-6.0.14), named Sharkworklisthandler, Copy the Hsqldb.jar file in the Sharkworklisthandler/web-inf/lib directory under Tomcat's Lib directory.

3. Modify the related configuration file

Modify the Sharkworklisthandler/meta-inf/context.xml file, the original file is for TOMCAT5 configuration, need to make corresponding changes to adapt to tomcat6. Modify to the following:

<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<Context>
<resource name= "sharkdb" auth= "Container" type= "Javax.sql.DataSource" maxwait= "5000" maxactive= "300"
Maxidle= "2" username= "sa" password= "" Driverclassname= "Org.hsqldb.jdbcDriver"
Url= "Jdbc:hsqldb:file:c:/java/tomcat-6.0.14/webapps/sharkworklisthandler/db/hsql/hsql"/>
<transaction factory= "Org.objectweb.jotm.UserTransactionFactory" jotm.timeout= "180"/>
</Context>

where the actual path in the URL is based on the actual address of the Sharkworklisthandler/db/hsql in addition to a/hsql. If you do not change the "/" to "/", try it.

To modify the Sharkworklisthandler/web-inf/web.xml file to add data source information:

<?xml version= "1.0" encoding= "Utf-8"?>
<! DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.3//en"
"Http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name> shark-test </display-name>
<description> Shark Sample JSP application. </description>
<resource-ref>
<description> Datasource Connecton </description>
<res-ref-name> SHARKDB </res-ref-name>
<res-type> Javax.sql.DataSource </res-type>
<res-auth> Container </res-auth>
</resource-ref>
</web-app>

Modify the sharkworklisthandler/conf/sharkjspclient.conf file to match the JTA configuration to Tomcat6:

Xausertransactionlookupname=java:comp/usertransaction
Databasemanager.defaults.xatransactionmanagerlookupname=java:comp/usertransaction
Databasemanager.db.sharkdb.connection.datasourcename= "JNDI:SHARKDB"
Sharktxsynchronizationfactory.xatransactionmanagerlookupname=java:comp/usertransaction

4. Start Tomcat6 and enter Http://localhost:8080/sharkworklisthandler in the browser.

Attachment: Use of the Oracle Database modification method:

A. Copy the latest version of oracle10.1.0.5.0 JDBC driver Ojdbc14.jar (available on the official Oracle Web site, oracle9i with a faulty driver, causing an error when pouring into the process definition data) put it under Tomcat's Lib directory.

B. Modify the Sharkworklisthandler/meta-inf/context.xml file:

<?xml version= ' 1.0 ' encoding= ' utf-8 '?>
<Context>
<resource name= "sharkdb" auth= "Container" type= "Javax.sql.DataSource" maxwait= "5000" maxactive= "300"
Maxidle= "2" username= "Shark" password= Shark "driverclassname=" Oracle.jdbc.driver.OracleDriver "Url=" jdbc:oracle: Thin: @localhost: 1521:develop "/>
<transaction factory= "Org.objectweb.jotm.UserTransactionFactory" jotm.timeout= "180"/>
</Context>

C. Modify the sharkworklisthandler/conf/shark.conf file and comment out the following three lines:

DatabaseManager.DB.sharkdb.ObjectId.NextWithPrefix = True
DatabaseManager.DB.sharkdb.ObjectId.NextColumnName = nextoid
DatabaseManager.DB.sharkdb.Connection.ShutDownString = SHUTDOWN

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.