Thursday, April 10, 2008

Update: Using the JBI JavaEE Service Engine

Previously I wrote about how to use the JBI JavaEE Service Engine to increase performance when orchestrating EJB Services created in Glassfish with the BPEL Service Engine in OpenESB. That was almost 8 months ago and Netbeans and OpenESB have changed a lot and consequently I needed to update it.

So I would like to provide an update using the latest Netbeans (20080402).

Again, if you haven't already, go ahead and download and install OpenESB which includes Netbeans v6 and Glassfish v2.

  1. Create an EJB Module
    • File > New Project > Category Enterprise > Projects EJB Module
  2. Create a new Web Service
    • Right click on your EJB Module project
    • Choose New > Web Service
    • Add a new Operation
  3. Create a new BPEL Module
    • File > New Project > Category SOA > Projects BPEL Module
  4. Create a new BPEL Process
    • Right click on your BPEL Module project
    • Choose New > BPEL Process
  5. Create a new SOAP WSDL
    • Right click on your BPEL Module project
    • Choose New > WSDL Document
    • Go through the wizard and for the Binding Type make sure its SOAP
  6. Configure your BPEL Process by dragging the SOAP WSDL onto the left side of the BPEL Process.
    • Add the standard "buttons" to the BPEL Process Sequence
      • Receive
      • Assign
      • Invoke
      • Assign
      • Reply
  7. Utilize the EJB Web Service in the BPEL Process (this is where things are different than in past versions)
    • Right click on the Web Service under the EJB Module and select Generate and Copy WSDL
    • Uncheck Do no copy if it is checked.
    • Expand your BPEL Module and copy the WSDL into the BPEL Module's src directory.
    • Now you should have a copy of the Web Service's WSDL in your BPEL Module.
    • Drag this new WSDL onto the right side of the BPEL Process so that we can tie the Invoke call to it.
  8. Create a Composite Application
    • File > New Project > Category SOA > Projects Composite Application
    • Right click on the new Composite Application and select Add JBI Module
    • Add both your BPEL Module and EJB Module
    • Clean and build the Composite Application (Right click > Clean and Build)
    • View your CASA file by double clicking on the Service Assembly file under your Composite Application.
  9. Your CASA file should look something like this
  10. Now you should be able to start Glassfish and deploy your Composite Application. Now your BPEL Process will utilize the Java EE Service Engine. FYI, do not deploy the EJB Module separately since its included in the Composite Application.

3 comments:

Anonymous said...

After i deploy the application how can i access it. Should it be something similar to http://localhost:8080/....??

Thank u

Anonymous said...

Hm! No answer on how to access BPEL modules since June.
Is it a big secret on how to actually use technology offered by Glassfish?

Anonymous said...

Hi,

You test the application by calling web service url which are created in step 5.

Another alternative is create the test in composite application and select the above web serivice for testing.

Regards,
S