When you are integrating different systems together, it can be very easy to use your vendor’s APIs and program directly against them. Using that approach, developers can easily integrate applications. Supporting these applications however can become problematical. If we have a few systems integrated together in this approach, everything is fine, but the more systems we integrate together, the more integration code we have and it rapidly becomes unfeasible to support this point-to-point integration.
To overcome this problem, the integration hub was developed. In this scenario, developers would write against the API of the integration vendor and only had to learn one API. This is a much better approach than the point-to-point integration method however it still has its limitations. There is still a proprietary API to learn (albeit only one this time), but if the integration hub goes down for any reason, then entire Enterprise can become unavailable.
The Enterprise Service Bus (ESB) overcomes these problems by providing a scalable, standards based integration architecture. The NetBeans SOA pack includes a copy of OpenESB, which follows this architecture promoted by the Java Business Integration Specification JSR 208.
Workings of an ESB
At the heart of the ESB is the Normalized Message Router (NMR) - a pluggable framework that allows Java Business Integration (JBI) components to be plugged into it as required. The NMR is responsible for passing messages between all of the different JBI components that are plugged into it.
The two main JBI components that are plugged into the NMR are Binding Components and Service Engines. Binding Components are responsible for handling all protocol specific transport such as HTTP, SOAP, JMS, File system access, etc. Service Engines on the other hand execute business logic as BPEL processes, SQL statements, invoking external Java EE web services, etc. There is a clear separation between Binding Components and Service Engines with protocol specific transactions being handled by the former and business logic being performed by the latter.
This architecture promotes loose coupling in that service engines do not communicate directly with each other. All communication between different JBI components is performed through Binding Components by use of normalized messages as shown in the sequence chart below.
In the case of OpenESB, all of these normalized messages are based upon WSDL. If, for example, a BPEL process needs to invoke a web service or send an email, it does not need to know about SOAP or SMTP that is the responsibility of the Binding Components. For one Service Engine to invoke another Service Engine all that is required is a WSDL based message to be constructed, which can then be routed via the NMR and Binding Components to the destination Service Engine.
OpenESB provides many different Binding Components and Service Engines enabling integration with many varied different systems.
So, we can see that OpenESB provides us with a standard based architecture that promotes loose coupling between components. NetBeans 6 provides tight integration with OpenESB allowing developers to take full advantage of its facilities.
Integrating Netbeans6 IDE with OpenESB
Integration with NetBeans comes in two parts. First, NetBeans allows the different JBI components to be managed from within the IDE. Binding Components and Service Engines can be installed into OpenESB from within NetBeans and from thereon the full lifecycle of the components (start, stop, restart, uninstall) can be controlled directly from within the IDE.
Secondly, and more interestingly, the NetBeans IDE provides full editing support for developing Composite Applications¬ applications that bring together business logic and data from different sources. One of the main features of Composite Applications is probably the BPEL editor. This allows BPL process to be built up graphically allowing interaction with different data sources via different partner links, which may be web services, different BPEL processes, or SQL statements.
Once a BPEL process or composite application has been developed, the NetBeans SOA pack provides tools to allow different bindings to be added onto the application depending on the Binding Components installed into OpenESB. So, for example, a file binding could be added to a project that could poll the file system periodically looking for input messages to start a BPEL process, the output of which could be saved into a different file or sent directly to an FTP site.
In addition to support for developing Composite Applications, the NetBeans SOA pack provides support for some features many Java developers would find useful, namely XML and WSDL editing and validation. XML and WSDL files can be edited within the IDE as either raw text, or via graphical editors. If changes are made in the raw text, the graphical editors update accordingly and vice versa.