This blog details the experiments I did recently to make ServiceMix run inside GlassFish application server.
The other interesting thing about this integration is the ability of the GlassFish application server to allow the in-process communication between ServiceMix and Java EE components (EJBs/Servlets wrapped as webservices) using a readily available JBI component of GlassFish viz., the Java EE Service Engine.
Details of the versions of the various softwares I used for this experiment :
|Brief descriptions of ServiceMix, GlassFish and Java EE Service Engine|
ServiceMix is an open source distributed Enterprise Service Bus (ESB) and SOA toolkit built on the semantics and APIs of the Java Business Integration (JBI) specification JSR 208 and released under the Apache license. More details about the ServiceMix is found at http://servicemix.org.
GlassFish is free and open source Java EE 5 application server. It is based on the source code for Sun Java System Application Server donated by Sun Microsystems. More details about the GlassFish is found at http://glassfish.dev.java.net.
Java EE Service Engine acts as a bridge between GlassFish and JBI environment for web service providers and web service consumers deployed in GlassFish. It provides numerous benefits including the following :
This article is for those who want to use ServiceMix as their JBI runtime with GlassFish application server. So the article explains how to install ServiceMix on GlassFish and how the ServiceMix can use Java EE Service Engine to do in-process communication with the Java EE applications (web services) deployed on GlassFish.
|Installing ServiceMix on GlassFish|
Download, install and start the latest GlassFish (if you haven't done already) from here. From now on, I will refer $glassfish_dir to GlassFish installation directory.
Download either the source or binary distribution of ServiceMix from here. Now we need to create ServiceMix WAR file inorder to install ServiceMix on GlassFish. From now on, I will refer $servicemix_web_dir to your servicemix-web directory which will be either examples/servicemix-web (for binary distribution) or samples/servicemix-web (for source distribution).
Create ServiceMix WAR file :
Deploy ServiceMix WAR file to GlassFish :
|Accessing the EJBs deployed on GlassFish from ServiceMix using Java EE Service Engine|
A sample application demonstrates how to access EJB webservice deployed on GlassFish application server from ServiceMix using Java EE Service Engine.
This is the schema of flow of the sample.
The source code of this sample is available in GlassFish workspace under appserv-tests/devtests/webservice/jbi-serviceengine/sm/bc_consumer_se_provider
Here are the steps to checkout the GlassFish source code and run the sample :