What is JBI?
The Java Business Integration spec (JBI) is a Java-based standard that defines a runtime architecture for plugins to interoperate via a mediated message exchange model. This mediated message exchange model was simply adopted from the WSDL 2.0 spec's message exchange patterns (MEPs). Messages between components are mediated by the Normalized Message Router (NMR). The NMR serves as an intermediary for routing messages amongst plugins, no matter where that component resides. Plugins do not communicate directly with one another; they only communicate with the NMR. This provides location transparency for the plugins. The plugins mentioned above come in two flavors, binding components and service engines. Sometimes it makes more sense to refer to them simply as bindings and engines. Binding components and service engines are generically referred to as JBI components. JBI components are deployed to the JBI environment and simply run in memory waiting for a configuration (more on this below in the section named Using JBI Components). A binding component (BC) has two purposes: BCs are used to communicate outside the JBI environment. Examples of remote protocols provided by BCs include HTTP/S, JMS, FTP, SMTP, XMPP, RMI, CORBA, etc. Some examples of binding components in ServiceMix include: Message normalization/denormalization is the act of converting a message from/to a protocol-specific format into a format for the JBI environment. This normalization is performed by BCs involves converting all messages into a There is no canonical message format for JBI. Messages simply must be normalized to meet the criteria above. A service engine (SE) provides some type of logic inside the JBI environment and only communicates with the NMR. If a SE needs to communicate outside the JBI environment, it must send a message to a BC (via the NMR). Examples of SEs include rules engines, BPEL engines, XSLT engines, scripting engines, EJB containers, etc. Some examples of service engine components in ServiceMix include: JBI components are most typically provided to you with the JBI container and they provide support for some of the most common protocols and engines. In order to make use of these components as an application developer, you must provide a configuration for each component you want to use. Configurations are implementation specific but the packaging is defined by the JBI spec. Each component configuration must be packaged as a service unit (SU) (see What is a JBI SU and how do I create one?) and each SU must be wrapped in a service assembly (SA) (see What is a JBI SA and how do I create one?). These are simply ZIP/JAR files that contain a XML descriptor named Upon first encountering JBI, some folks assume that they need to begin writing their own components. You might, in fact, need to do this, but understanding why you would need to do this is an important first step. To understand why, read the following FAQ entry:JBI Components
Binding Components
Examples
Message Normalization
NormalizedMessage
. A normalized message consists of the following:
Service Engines
Examples
Using JBI Components
jbi.xml
that is used by the JBI environment. For those folks who are familiar with Java EE development, these ZIP files are similar to WARs and EARs.Should I Create My Own JBI Components?
Additional Reading
The following articles are highly recommended follow-up reading to the information on this page:
- JBI Components: Part 1 (Theory) by Ron Ten-Hove
- Using JBI for service oriented integration by Ron Ten-Hove