O'Reilly logo

Oracle SOA Suite 11g Developer's Cookbook by Matt Wright, Antony Reynolds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Singleton composite

A typical use case with a composite would be submitting a request to an external resource/system that only supports a single connection at a time. In such a case, we need to protect against parallel composite instances submitting concurrent requests to that resource.

This implies that we need some way to serialize requests for that resource (probably on a first-in, first-out basis). A common design pattern for achieving this is the singleton, first documented in the book Design Patterns: Elements of Reusable Object-Oriented Software, Gang of Four (where they use a print spooler as an example).

Now, BPEL doesn't explicitly support the notion of a singleton, however it does allow you to simulate one using a variation of the Message ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required