JBoss.orgCommunity Documentation

ESB Tools Reference Guide

Tatyana Romanovich

Version: 1.1.0.CR2

April 2008


1. Introduction
1.1. What is ESB?
1.2. Other relevant resources on the topic
2. ESB Support
2.1. ESB Tools Installation
2.2. Creating a ESB Project
2.3. Creating ESB Project using JBoss Tools Project Examples Wizard
2.4. Deploying a ESB Project
2.5. Creating a ESB File
2.6. Configuring ESB Runtime in Preferences
2.7. Using and Configuring SOA Platform
3. ESB Editor
3.1. ESB File Editor
3.2. ESB Editors Features
3.2.1. ESB syntax validation
3.2.2. Support for XML Schema
3.2.3. Content Assist for ESB XML file
3.2.4. Synchronized Source and Visual Editing

In this section we will focus on all concepts that JBoss Tools integrate for working with JBoss ESB.

In this chapter you will know how to predefine a JBoss ESB runtime on the Preferences page.

You may already know, there are two ways to set JBoss ESB runtime when creating a ESB project, one is to use the project target JBoss runtime, and another is to select a JBoss ESB runtime predefined in JBoss Tools preferences. Let's configure it.

Select Window >Preferences > JBoss Tools > JBoss ESB Runtime , to open the JBoss ESB Runtime Preferences page where you can add, remove and Edit a JBoss ESB runtime.


Select Add to open a dialog where you can specify the JBoss ESB runtime location, name and version number. You also can customize the libraries of the runtime by checking the Customize JBoss ESB Runtime jars checkbox.


The new JBoss ESB Runtime will be configured. Click OK to finish and save the preferences. You can use the configuration when creating a JBoss ESB project.

When a ESB runtime is configured for your ESB project you are able to change it to any other using the classpath container page for ESB runtime. To do that, turn to the Package Explorer view and right-click the "JBoss ESB Runtime" library. Select Properties and a table listing all available JBoss ESB runtimes will appear:


Choose one of them to set to the ESB project and click Ok.

ESB container allows Source and JavaDoc locations to be set via the Properties dialog on each contained .jar: right-click on any .jar file, select Properties. Choose Java Source Attachment and select location (folder, JAR or zip) containing new source for the chosen .jar using one of the suggested options (workspace, external folder or file) or enter the path manually:


Click on Apply and then on Ok.

To change Javadoc Location choose Javadoc Location and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called package-list:


Click on Apply and then on Ok.

In this chapter you will know what is JBoss Enterprise SOA Platform and how you can configure it to use for your ESB projects.

JBoss Enterprise SOA Platform delivers a flexible, standards-based platform to integrate applications, SOA services, business events and automate business processes. The SOA Platform integrates specific versions of JBoss ESB, jBPM, Drools and the JBoss Enterprise Application Platform that are certified to work together in a single supported enterprise distribution.

Having configured JBoss Enterprise SOA Platform for your ESB project you don't need to install and configure ESB server and runtime as they are already included.

Check here to find more details on the platform: JBoss Enterprise SOA Platform and JBoss Enterprise SOA Platform Component Details.

You can find out what is SOA here: Basics of SOA and SOA and EOA.

To configure the JBoss Enterprise SOA platform select Window > Preferences > Server > Runtime Enironments, that will open the Server Runtime Environments Preferences page where you can add, remove and edit a Server Runtime Environment.


Select Add, choose JBoss 4.2 Runtime as a type of runtime environment, check the Create a new local server checkbox and click Next:


On the next step you can specify a name of the server runtime environement and browse to its location. Click Finish to add the server runtime environment.


Now you have your SOA platform configured. To check the configuration create a ESB Project using instructions described here. As a result you will have two projects created:


Then you will need to add JBoss ESB libraries to your projects to configure the SOA server runtime exactly for your projects. Right-click on your project, select Build Path > Add Libraries:


Choose JBoss ESB Libraries and click Next:


Select the necessary runtime to add to the project classpath:


Click Finish.

Now you can deploy your Helloworld project to the server and run a test class in the client Java project to see the test result in the Console view.

ESB editor has lots of useful features, they are described in details in this chapter. In addition you'll get to know with how ESB Editor uses combined visual and source editing of esb files.

ESB File Editor is a powerful and customizable tool. ESB File Editor allows developing an application using ESB technology.

ESB file editor has two tabs: Tree and Source.

You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a tree format. By selecting any node you can see and edit its properties which will appear in the right-hand area. For example, a Provider:


You can easily switch from Tree to Source by selecting the Source tab at the bottom of the editor and work in Source view.


The Source view for the editor displays a text content of the ESB file. It is always synchronized with Tree view, so any changes made in one of the views will immediately appear in the other.

No matter what view you select, you get full integration with Outline view. For example, you can work in the Source view with the help of the Outline view. The Outline view shows a tree structure of the ESB file. Simply select any element in the Outline view and it will jump to the same place in the Source editor, so you can navigate through the source code with Outline view.


Adding, editing or deleting of some artifacts operations are available right in the Tree view . Right-click any node and select one of the available actions in the context menu. For example, you can easily add a new Provider:


You can easily add a new Service too:


The same way you can create a listener for service and other elements of ESB:


The same actions can be done in the right part of Tree view tab (Form editor) using Add, Edit and Remove buttons.

In order to add a new generic Action to your ESB XML file you should select the Actions node under the Services, then right-click and choose New > Generic Action.


Or instead make use of Add... button in the Form editor on the left.


As you can see on the bath figures above, the context menu will also prompt you to insert one of the Actions that are supplied out-of-the-box with JBoss ESB. After choosing one an appeared New Action wizard will ask you to fill out a name field and other fields specific for each Action property. For example, for Content Based Router Action the wizard looks as follows:


After confirming creating the Action you can see it in the Tree under the Actions node and preview as well as edit its settings in the Form editor on the left.


ESB editor can recognize some specific objects. On the figure you can see org.jboss.soa.esb.actions.ContentBasedRouter in the Class section.

JBoss ESB tooling has powerful editor features that help you easily make use of content and code assist.

This last chapter covers capabilities on how you can use ESB editor.