Seasar 2, the most popular Dependency Injection (DI) open source framework in Japan. S2Container (Sesar2) provides set of components called S2JMS (Sesar2JMS) to easily build applications to send and receive messages through JMS.
A Sesar container supports Distributed transactions (JTA) and JMS connection pooling. Sesar connects to MOM vendors through Resource Adapter.
Outbound Communication
Outbound Communication is a form of sending and receiving messages from MOM via resource adapter.
In Outbound communication, Application creates the connection to MOM with API javax.jms.ConnectionFactory # getConnection () before sending or receiving messages.
Inbound Communication
Inbound Communication is a form of receiving messages asynchronously from MOM via resource adapter.
In Inbound communication, resource adapter creates the connection to MOM. When Messages is available in MOM, Resource adapter notifies the application with Message.
This section explains how to integrate FioranoMQ client samples with Sesar Framework. Fiorano Sesar samples are created as Eclipse java project so can be imported to Eclipse IDE.
Fiorano Sesar samples are developed with Seasar S2JMS-1.0.1 version. Please refer to http://www.seasar.org/index.html for latest version
The resources and libraries listed below are needed:
- FioranoMQ Server
- Fiorano Resource Adapter
- fmq-client.jar
- fiorano-framework.jar
- jms.jar
The Samples for the Seasar Framework are present in the directories listed below:
<FMQ_HOME>/samples/SeasarJMSSample
The sample directory comprises of the two directories listed below:
- The "lib" directory should contain the necessary jars.
- The "src" directory contains the java samples and the Spring configuration files.
The above listed jars are shipped along with FioranoMQ. Copy fmq-client.jar, fiorano-framework.jar, jms.jar to lib directory.
Generate Fiorano Resource Adapter (fmq-connector-ra.rar) and copy the same to lib directory. Refer to "Deployment of FioranoMQ Resource Adapter" section for more detail about Resource Adapter.
The Seasar configurations are present under the directory "src".
.dicon files provide the samples with configurations like destination, ContextFactory, ConnectionFactory, XATrasanctions and so on. Detailed explanation can be found as inline comments in .dicon files.
The java samples are present under the directory "src/seasar". These java files pickup configurations from .dicon files.
Samples can be run and debugged from Eclipse IDE.