Developer Tutorial (How to build on B2J)
Author: Antony Miguel, Last Updated 19th April 2006
If you found this tutorial useful or lacking in any way or if you think there are certain areas which could be better explained or more fully explained please Let Me Know.
How developers and vendors can build on B2J
-
B2J can be extended via two routes:
- By writing Web Services that the B2J reference engine can run
- By using the B2J APIs to run BPEL processes
B2J BPEL execution API
-
All the B2J public APIs are gathered under a 'publicapi' package in the two B2J plugins:
- org.eclipse.stp.b2j.core
- org.eclipse.stp.b2j.ui
- org.eclipse.stp.b2j.core.publicapi.example.IndependantAPIExample
- org.eclipse.stp.b2j.ui.publicapi.example.WorkbenchAPIExample
- org.eclipse.stp.b2j.core.publicapi.program.BPELProgram
- org.eclipse.stp.b2j.core.publicapi.engine.BPELEngineListener
- org.eclipse.stp.b2j.core.publicapi.transport.session.SessionAddress
- org.eclipse.stp.b2j.core.publicapi.engine.WorkbenchBPELEngine
- org.eclipse.stp.b2j.ui.publicapi.program.WorkbenchBPELProgram
- (Note that the WorkbenchBPELProgram is in the B2J UI plugin since it depends on the B2J Eclipse UI)
- org.eclipse.stp.b2j.core.publicapi.engine.IndependantBPELEngine
- org.eclipse.stp.b2j.core.publicapi.program.IndependantBPELProgram
Running a non-local BPEL process
-
If you decide to use the B2J distributed BPEL engine then you will need to use the SessionAddress object.
The SessionAddress object is basically equivalent to a hostname except with more information about requirements
you have on that particular network link.
When you are using the B2J distributed BPEL engine there is a single link
from the client workbench to the coordinator host and one link from the coordinator host to each of the worker
hosts (see the B2J Distribution Tutorial if
you are unclear on what this means). When running a distributed BPEL program you can specify a SessionAddress for each of these links and in tandem
a SessionAddress to specify the daemon connection information for each of these links. (e.g. one SessionAddress to specify
a connection to an engine Daemon on host X using password Y and another SessionAddress to specify the actual engine
connection to that host using encryption or link reconnection etc).
- encryption - the link should be encrypted (e.g. if Daemon is set to use HTTPS)
- encryption strength - the minimum strength of the encryption required on the link
- authentication - the link should be authenticated
- link reconnection - if the link fails it should be automatically reestablished
- link reconnection timeout - the time to wait before giving up trying to reconnect a broken link
- link reconnection start timeout - the time to wait before giving up making the initial link connection
- requires password - used to specify whether a Daemon requires a password
- password - used to specify the password for a Daemon
- initiator host - (IGNORED) the host that should initiate the link connection
- initiator port min/max - (IGNORED) the local port range the initiator host should use
- listener host - the host that should listen for the link connection
- listener port min/max - (IGNORED) the local port range the listener host should use
- transport provider class - (IGNORED) the classname of the underlying transport provider
- transport provider plugin name - (IGNORED) the plugin of the underlying transport provider
| Eclipse Workbench | ||
| | | ||
| Coordinator host | ||
| / | | | \ |
| Worker host 1 | Worker host 2 | Worker host 3 |
Each SessionAddress contains a number of attributes which place requirements on the link. The attributes are as follows (note that those attributes marked with 'IGNORED' should be ignored or left unset as the underlying implementation will set during the engine setup):
