Tuesday, July 21, 2009

Sample Hibernate and Jbpm application.

There have been a few requests in the jBPM forum about how to integrate jBPM4 with an application's domain. So this is a first pass at whipping up a sample project that does exactly that.

I will be refining this once I get some more time, but I thought I would put as much of it out there as I have working, maybe it will help someone right away.

This is a Maven2, Hibernate3.2.6.ga based project. We will be working with jBPM v4.0. This is the GA release that came out under a couple of weeks ago.

The goal is to have a running web application that uses jBPM4 in the embedded form. This would be a typical way in which jBPM4 would be used. This will help guide people to work with a simple hibernate based jBPM web application that beginners can build upon to build their own web application.

This post will be updated in the next couple of days, w.r.t instructions.

But just wanted to put the code out there. So that one can get going,

We will also be working with integrating with something like Google Guice, down the line. This is something I wanted to play with myself.

The code is hosted at Google Code.
You can check it out as follows:

svn checkout http://jbpm-hibernate-demo.googlecode.com/svn/trunk/ jbpm-hibernate-demo-read-only

The important files are
1.) jbpm_demo.jbpm.cfg.xml
2.) jbpm_demo.hibernate.cfg.xml

They have the configuration required to boot up hibernate and setup the jbpm engine.

Thursday, March 12, 2009

Maven on Leopard

Mac OS X keeps updating and installing patches which has broken my maven installation a couple of times.

Looked around for a solution and there really was not one place that could help. Well finally figured out the problem and just thought I would post it in case anyone happened to run into it.

1.) install maven. I like to do everything in a local directory in my home directory. So something like ~/local/apache-maven/apache-maven-2.0.10 would be the target install directory.
2.) Fire up ~/.bash_profile in an editor and type in the following:

export M2_HOME=/Users/svemuri/local/apache-maven/apache-maven-2.0.10/
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
export PATH=M2_HOME/bin:/usr/local/bin:$JAVA_HOME:$PATH

This way the mvn and java that you specify will be the ones running and not the ones installed by default by Mac OS X. Of course you can use any of the versions that you choose to and you could point to /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home if you wish to use JDK 1.6.

This should fix the following problems:
Permission Denied when running mvn
NoClassDefFoundError for a Launcher class.