Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Swordfish Documentation: Apache ODE integration"

(Apache ODE and Geronimo Transaction Manager class loading issue)
(Apache ODE and Geronimo Transaction Manager class loading issue)
Line 42: Line 42:
 
[[Image:Tx_classloading_issue.jpg]]
 
[[Image:Tx_classloading_issue.jpg]]
  
We have currently org.apache.ode.bpel.evt.VariableModificationEvent while trying to execute any ODE process.  
+
We have currently class not found exception while trying to execute any ODE process.  
 
This issue can be reproducible on SMX4 also.
 
This issue can be reproducible on SMX4 also.
  

Revision as of 11:30, 10 March 2009

how to deploy ODE+BPEL sample in swordfish

By default you have ode samples as jbi component package zip. To be able to deploy it to Swordfish you need to have osgi bundle. To do this you need to do following actions:

  • change extension from zip to jar
  • change component archive:
    • open archive for editing (on unpack it somewhere) and go to METAINF folder, you should see jbi.xml file here.
    • add MANIFEST.MF file in this folder with following content:
Manifest-Version: 1.0
Bundle-SymbolicName: !!!!YOUR BUNDLE NAME!!!!!
Bundle-Version: 0.0.0
DynamicImport-Package: javax.*,org.xml.*,org.w3c.*


  • repack archive and you are ready to install bundle
  • run swordfish and install bundle manually with osgi> install file:///c:/you-bundle-location
  • start bundle with command osgi> start BUNDLE_ID (you can check bundle ID with osgi> ss command)
  • alternatively you can add bundle statement to \org.eclipse.swordfish.bundles\config.ini file to automatic install and start on Swordfish startup.

IMPORTANT: don't foget to add 2 empty lines at the end of MANIFEST.MF file

Proposal for the JAX_WS-BPEL integration sample

The sample will cover both scenarios:

  • calling a BPEL process from JAX-WS (BPEL as service provider)
  • calling a JAX-WS service from BPEL (BPEL as service consumer)

The sample realizes the same flight reservation functionality as our standard JAX-WS sample, but uses a reservation storage, which instead implemented as internal hash table is implemented as a separate JAX-WS web service.

We realize the createReservation function as BPEL process calling a JAX-WS implemented reservationStorage.

So the java createReservation implemetation will call an ODE web service implementing this function. BPEL would construct a reservation from the input data and then call a reservationStorage.put web service function.

This way we cover both scenarios in one example, but will provide separate test cases for both scenarios (using a mock BPEL service and calling BPEL directly).

Apache ODE and Geronimo Transaction Manager class loading issue

Tx classloading issue.jpg

We have currently class not found exception while trying to execute any ODE process. This issue can be reproducible on SMX4 also.

Follow diagram:

  1. After finishing process OdeService invoke commit() method on transaction manager. Context classloader at this point is "org.apache.xbean.classloader.MultiParentClassLoader (JBI component's classloader)"
  2. Geronimo transaction manager commits transaction and invoke afterCompletion callback method on each transaction participants. Context Classloader at this point is "BundleDelegatingClassLoader for [Apache ServiceMix JBI OSGi (org.apache.servicemix.jbi.osgi)]"
  3. invocation afterCompletion on persistent layer OpenJPA class org.apache.openjpa.kernel.BrokerImpl
  4. while invocation of afterCompletion() method classloading exception throws while trying to find ODE specific class (org.apache.ode.bpel.evt.VariableModificationEvent) because context classloader still "BundleDelegatingClassLoader for [Apache ServiceMix JBI OSGi (org.apache.servicemix.jbi.osgi)]" at the point 3.

To reproduce this you need to copy ODE-jbi.zip and PingPong-sa.zip to SMX4/deploy folder and run "ant test" from PingPong ode examples folder.

Back to the top