Namespace-aware Camel routing

The early Open ESB Camel SE examples use a simple input message with an Apache Camel Enterprise Integration Patterns (EIPs) content-based-routing XPath expression.

I needed to work on a more realistic example involving messages with namespace qualified elements, so I updated the routing logic to pass a Map of namespaces to the XPathBuilder before configuring Fluent Builders Java DSL content-based-routing.

  // Sets up a namespace-qualified XPath expression
  XPathBuilder orderPriceGT500 =
    new XPathBuilder("//po:OrderInfo/po:OrderPrice > 500");
  Map nsm = new HashMap();
  nsm.put("po", "http://www.globalcompany.com/ns/order");
  orderPriceGT500.setNamespaces(nsm);

and:

  // Routes based on expression evaluation
  from(jbiInURI).choice().when(orderPriceGT500).to(jbiBpel2DbURI).
    otherwise().to(jbiBpel2FileURI);

Category: camel se, open source, open-esb

Posted by: Mike Wright on: October 23, 2008

Tags:

Netbeans Weekly Newsletter

From this week’s edition of the Netbeans Weekly Newsletter,

here are a couple of highlights:

  1. Under Calendar:
  2. Under Projects:

    “Project OpenESB is an Open Source project that is building an ESB that consists of both a runtime and a design time tooling based completely on NetBeans. In the last few years, OpenESB has made important contributions to the NetBeans IDE, for example, the WSDL editor, the CASA editor, the BPEL editor, and more. GlassFish ESB, the first milestone of a commercially supported binary distribution, is now available. The distribution includes NetBeans and adds extra components, such as JAXB based code seeding, a JCA wizard, and more, that are not available in the IDE’s standard downloads.”

You can also subscribe to the newsletter(s).

Category: glassfish esb, netbeans, open source, open-esb

Posted by: Mike Wright on: September 16, 2008

Tags:

SOA Friday

Some Open ESB related news of interest (at least to me) this week:

Category: glassfish esb, open-esb, virtualbox

Posted by: Mike Wright on: September 12, 2008

Tags:

Open ESB scalable testing environment

virtualization plan

Working towards JBI Service Engine scalable testing

When checking out different branches from different projects using different tools, it is hard to predict which two or three builds need to run at any given time.   I’ve had to maintain nearly identical setups across multiple physical systems.

Plan: attach granular VirtualBox disks to a particular virtual machine as needed.

The benefits:

  • save energy (powering up fewer physical machines when only running a couple of builds at once)
  • “on demand” scaling (”move” work to additional physical machines by copying a relatively small disk image for each vm)
  • less entropy (cloning disks ensures identical setups)

This makes it easier to distribute test clients and servers across my network and try different WS-Notification publish/subscribe use-cases and configurations.

Category: open-esb, virtualbox

Posted by: Mike Wright on: September 10, 2008

Tags: , ,

upload vs. copy during JBI Component install

step 1 radio buttons

(install step 1; radio buttons)

 I was asked today about the difference between upload and copy when using the GlassFish v2 web admin console to install a JBI component into Open ESB.


Case 1. The JBI archive is on the “client” system. Use the default “File to Upload:” radio button.

browser's file upload dialog

(browser upload dialog)


opens the web-browser’s file upload dialog to select the file to be uploaded from the client file system to the remote GlassFish Domain Admin Server (DAS).  uploads the selected file.

Case 2. The JBI archive is on the “server” system. Use the “File to Copy:” radio button.

woodstock chooser

woodstock file chooser

opens a  Woodstock file chooser in a pop-up window, showing only files on the system running the GlassFish DAS.  copies the selected file.

Case 3. The web browser and the DAS are running on the same system. Either upload or copy would work, since the JBI archive is accessible by both the web browser and the DAS.

Category: glassfish, jbi, open-esb, web admin console

Posted by: Mike Wright on: August 28, 2008

Tags: