In a BPEL process, when there is an invoke to an external synchronus web service, and if you want to send the response of this service to a different endpoint (rather than sending back to the BPEL process), you can use Unified Endpoint configuration of WSO2 BPS 3.0.0 to set the WS:Addressing ReplyTo header as follows:
You can refer to this config file (locatd in registry or in the file system) as follows, inside the deploy.xml file:
There are other use cases of UEP like adding QOS, Security etc. You can read more on that here.
Wednesday, February 20, 2013
Tuesday, February 19, 2013
Use of 'DynamicImport-Package: *' in OSGi
In OSGi, 'DynamicImport-Package' attribute is used in the MANIFEST.MF file to specify the patterns of packages that are not found in the normal bundle contents or Import-Package field. If the package is not available in the initial resolution process, it will not fail, but will be attempted to resolve every time a class from the package is required.
'DynamicImport-Package: *' is a trick used by bundles to allow importing client packages which are not known during bundle build time, in addition to its own dependencies, to prevent ClassNotFoundException issues. [i.e. If there are classes which have Class.forName (or other dynamic look up)] This turns OSGi Framework into a very expensive class path for the packages involved and breaks the concept of versions in OSGi. Use of this attribute is said to be a sign of a non-modular design and it might be a good time to revisit the architecture.
To learn more:
'DynamicImport-Package: *' is a trick used by bundles to allow importing client packages which are not known during bundle build time, in addition to its own dependencies, to prevent ClassNotFoundException issues. [i.e. If there are classes which have Class.forName (or other dynamic look up)] This turns OSGi Framework into a very expensive class path for the packages involved and breaks the concept of versions in OSGi. Use of this attribute is said to be a sign of a non-modular design and it might be a good time to revisit the architecture.
To learn more:
- DynamicImport-Package - OSGi Community Wiki http://wiki.osgi.org/wiki/DynamicImport-Package
- What is the difference between bootdelegation and DynamicImport-Package in osgi http://stackoverflow.com/questions/14729568/what-is-the-difference-between-bootdelegation-and-dynamicimport-package-in-osgi
- If code uses Class.forName (e.g. hibernate) consider DynamicImport-Package https://github.com/bndtools/bnd/issues/80
Labels:
Best Practices,
Java,
OSGi
Location:
Colombo, Sri Lanka
Monday, February 11, 2013
How to make use of WS-Addressing ReplyTo header in an Asynchronus BPEL Process
In Apache ODE or WSO2 BPS, if you are looking for a way to asynchronously call back from a BPEL process, after the process is finished, to an reply address dynamically provided in the Request Message with WS-Addressing
You can read more here about Using WS-Addressing in SOAP UI
Hat-tip: From Apache ODE mail archives, Related question from StackOverflow
Labels:
Apache,
Asynchronus,
BPEL,
ODE,
SoapUI,
WS-Addressing,
WSO2,
WSO2 BPS
Friday, February 8, 2013
How to clean up Instance data for a given BPEL Process Instance ID from Apache ODE/WSO2 BPS
This is a stored procedure that can be used to delete all the instance related data from the DB for a particular BPEL instance.
Thursday, February 7, 2013
How to find BPEL Process Instance ID from Correlation Property Value in Apache ODE/WSO2 BPS
This is a small SQL query to retrieve Process Instance ID from the DB, when we know a Correlation Property Value, for a simple case where the correlation set consists of only one property.
Here, use the respective correlation property value instead of $CORR_PROP
SELECT PROCESS_INSTANCE_ID FROM ODE_SCOPE WHERE SCOPE_ID IN
(SELECT cs.SCOPE_ID FROM ODE_CORRELATION_SET cs WHERE
cs.CORRELATION_SET_ID IN (SELECT os.CORRSET_ID FROM ODE_CORSET_PROP
os WHERE os.PROP_VALUE='$CORR_PROP'));
Here, use the respective correlation property value instead of $CORR_PROP
Subscribe to:
Posts (Atom)