Thursday, October 29, 2009

An Impatient Start with JBoss Riftsaw - 5 steps in 5 minutes

I often recall having to spend many hours fighting with complex and error prone processes to install server software and get an 'helloworld' example running. With JBoss, however, it's much simpler. Unzipping a couple of files and maybe running ant generally does the trick.

Which brings us to Riftsaw, JBoss's new open source BPEL 2.0 engine. Riftsaw integrates with JBoss ESB and is optimized for use with the JBoss AS server. Even though it's a new project, it's easy to get going in only a few minutes. The entire set up process is documented in the Getting Started Guide, but if you're impatient, here are the steps. You can install and deploy everything you need in about 5 minutes, Assuming you don't have too slow a network connection. ;-)

You need (3) packages:
  • A JBoss application server to host Riftsaw,
  • A JBoss ESB server to support accessing services over the ESB,
  • and Riftsaw itself
Here are the (5) steps to take: (note - for this example, we're installing into /opt/local)

Step 1 - Install JBoss AS 5

On thing to keep in mind here is that you'll have to use Java 1.6 and install the for JDK 1.6 version of JBoss AS
Download: http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA-jdk6.zip/
unzip jboss-5.1.0.GA-jdk6.zip
Step 2 - Install/deploy JBoss ESB 4.6 to AS
Download: http://www.jboss.org/downloading/?projectId=jbossesb&url=/jbossesb/downloads/4.6/binary/jbossesb-4.6.zip
unzip jbossesb-4.6.zip
cd /opt/local/jbossesb-4.6/install
cp deployment.properties-example deployment.properties
edit deployment.properties-example (set "org.jboss.esb.server.home=/opt/local/jboss-5.1.0.GA")
ant deploy
Step 3 - Build/Install/Deploy Riftsaw to AS
cd /opt/local
mkdir riftsaw ; cd riftsaw
svn checkout http://anonsvn.jboss.org/repos/riftsaw/trunk/
mvn clean install -P docs
cp distribution/target/riftsaw-2.0-SNAPSHOT.zip /opt/local
cd /opt/local
unzip riftsaw-2.0-SNAPSHOT.zip
cd /opt/local/riftsaw-2.0-SNAPSHOT/install
edit deployment.properties (set "org.jboss.esb.server.home=/opt/local/jboss-5.1.0.GA" and "org.jboss.esb.home=/opt/local/jbossesb-4.6")
ant deploy
Note: An alternative to building Riftsaw from the trunk source would be to download the latest stable build from: http://www.jboss.org/riftsaw/downloads.html

Step 4 - Start up the AS server

cd /opt/local/jboss-5.1.0.GA/bin
sh ./run.sh
Step 5 - Run a quickstart

This BPEL quickstart sends a message, modifies it, and sends back the modified version.
cd /opt/local/riftsaw-2.0-SNAPSHOT/samples/quickstart/hello_world
ant deploy
ant sendhello
View the process here: http://127.0.0.1:8080/bpel-console/org.jboss.bpm.console.Application/Application.html
OK. It's not really 5 steps, to run the quickstarts that use the ESB, there's one more step:

Step 6 - Run an ESB quickstart

First, deploy Riftsaw ESB samples to the ESB directory.
cd /opt/local/riftsaw-2.0-SNAPSHOT/install
ant deploy-esb-examples
Then, run a quickstart:
cd /opt/local/jbossesb-4.6/samples/quickstarts/conf
cp quickstarts.properties-example quickstarts.properties
edit quickstarts.properties (set org.jboss.esb.server.home=/opt/local/jboss-5.1.0.GA)
cd /opt/local/jbossesb-4.6/samples/quickstarts/bpel_helloworld
ant deploy
ant sendesb (to demonstrate an ESB action invoking a BPEL process)
Well - my 5 minutes are up. What's next? I want to try all the examples, read the documentation and spend a lot more than 5 minutes working with Riftsaw. I also want to examine Riftsaw-ESB integration in greater detail in a subsequent blog post. It's described in the User Guide... ;-)

3 comments:

  1. Len, what is the licensing model for JBoss Riftsaw? Is it LGPL, like JBoss ESB?

    -Kodeninja

    ReplyDelete
  2. Yes LGPL, however all the ODE code is Apache Licensed.

    ReplyDelete
  3. Hi,

    I downloaded JBOSS as you mentioned but I am not able to understand what cd is? Sorry I am relatively new to this.

    Thanks,
    Maggie

    ReplyDelete