This guide introduces the user to the UltraESB configuration, testing and debugging with a supported IDE. This tutorial uses the IntelliJ IDEA Community Edition, which is an excellent IDE now available free of charge - which offers intelligent editing of the configuration as well as editing of Java code fragments embedded within the XML configuration elements
The UltraESB distribution ships with an IntelliJ IDEA project that allows one to edit the configuration, write custom mediation code, test mediation and services, and debug everything from within the excellent and user friendly IDE environment. You could easily create a similar project for your favourite IDE, and share it with AdroitLogic for inclusion into future releases. Opening the UltraRuntime project at the UltraESB home directory, one could now start to edit the configuration as shown below from within the IDE.
The very first time IDEA opens up the configuration file, it may report that the schema URI's are not registered as shown below.

Hovering the mouse over the highlighted text will show a balloon to the left edge of that line, which when clicked will show a menu to "Fetch External Resource". You will need to be connected to the Internet, and once you fetch all highlighted schemas you are all set to use the smart schema aware editing features of the IDE.

Note that as the UltraESB configuration is a Spring XML configuration file, a Spring aware version of IntelliJ IDEA (i.e. the commercial version) or another IDE that supports intelligent editing of a Spring configuration will be able to prompt with the valid options for configuration of the Spring managed beans as shown below. This applies when configuring the transports, transaction and JNDI settings etc.

When editing the mediation aspects of the UltraESB (e.g. ultra-dynamic.xml), any schema aware IDE or editor will now be able to prompt the possible and valid options as per the public schema, and report any violations etc. as shown below. Note that the community edition of the IntelliJ IDEA IDE includes this support.

The IntelliJ IDEA IDE community edition also has support for language injection, which could be used to edit Java mediation fragments within the XML configuration. To enable this feature, open "Settings" and select "Language Injection" from under "IDE Settings", and add a new language injection for the XML element named "java" under the namespace "http://www.adroitlogic.org/ultraesb" as shown below. You will need to specify the following text as the prefix, and then specify the string "}}" as the suffix to allow us to just write a Java code fragment without writing a full Java class within the configuration.
Prefix:
import org.adroitlogic.ultraesb.api.*; class x { public void execute(org.adroitlogic.ultraesb.api.Message msg) throws Exception {
Suffix:
}}
The prefix will also import the public API and expose the current message as a variable named "msg". The IDE will not inject this prefix or suffix into the configuration, but the user must ensure that any code fragment is a valid xs:string schema data type. Its always suggested to wrap code fragments within "<![CDATA[" and "]]>" tags to ensure that the content is properly handled by the XML parser.

Once the language injection is configured, the IDE will allow one to edit the Java code fragments within the XML configuration with full IDE support as shown below.

The UltraRuntime project ships with a configuration to start the UltraESB from within the IDE both in normal execution mode, and in debug mode. The same would be easily possible with any other IDE. This allows one to edit the configuration, run and debug the configuration all from within the same IDE environment.

| < Prev | Next > |
|---|


