JBI Component development (Part 3)

Developing JBI components 

1. Developing JBI componets - Theory


Implementing a JBI plug-in component involves fulfilling several JBI-defined contracts.
These contracts cover:

• Installation packaging and description
• Component life cycle management
• Messaging based on defined message exchange patterns
• Publication of offered services
• Service unit management


More details are available on the document: the JBI Components: Part 1 (Theory) from Ron Ten-Hove
https://open-esb.dev.java.net/public/pdf/JBI-Components-Theory.pdf

Technical document on developing JBI components from Srinivasan Chikkala
https://open-esb.dev.java.net/public/jbi-comp-examples/Developing_JBI_Components.html


2. Library Wrapper Service Engine ?

2.1. Architecture point of view

2.1.1. Specialized JBI Service Engine

A specialized Java Library Service Engine is easier to build, but it could be not relevant.
Needs for the Specialized Library Service Engine:

JBI Specific Library Wrapper Service Engine to glue the Java Library.
WSDL that describe the Library interface.
The Java Library calls are hard coded in the Library Wrapper Service Engine.

2.1.2. Generic JBI Service Engine

A Generic Java Library Service Engine is more complex to build, but it allows at design time to
use a Java library by using a WSDL that describe this Java Library.

Needs for the Generic Library Wrapper Service Engine:

JBI Generic Library Wrapper Service Engine.
WSDL that describe the Library interface.
Wrapper component to glue the Generic Service Engine to the Java Library
Dynamic loading of the Java Library Wrapper from the Generic Service Engine.

2.2. Use case: How to build a Library Wrapper Service Engine ?

For this use case, the Generic approach has been chosen.

The use case will demonstrate how to build a Generic Library Wrapper Service Engine
that uses a Java JNI wrapper Library.


2.2.1. Architecture of the Library Wrapper Service Engine



The Architecture of the Library Wrapper Service Engine is divided into four parts:


Java JNI Library: MyLib
Mapper: JNIMapper
JBI Generic Library Wrapper Service Engine.
Service Unit





Components of the JNI library: MyLib:

MyLib C. (MyLib.so or .dll)
Java JNI Wrapper using naitive call to MyLib C. (JNIWrapper.jar)
WSDL that describe the Java JNI Library interface. (MyLib.wsdl).

Components of the Mapper: LibMapper:

WSDLParser using JAXB APIs to parse any WSDL as MyLib.wsdl (WSDLParser.jar).
WSDLParser parses the MyLib.wsdl to find the operation name from the NMR message input.

LibMapper component glues the Generic Service Engine with any Java Lib. (LibMapper.jar).
Mapper implements IMapper interface for dynamic loading from the SE. (JNIMapper.jar).

IMapper defines two methods:

- init(params);
- callLib(params);

- init(params): provides the wsdl name to the mapper.

- callLib(params): provides the:
DOM Node that content datas extracted from the NMR message.
messageInput name from the NMR message.

- JNIMapper: to glue the Generic Service Engine with the specific Java JNIWrapper (JNIMapper.jar).
JNIMapper extends Mapper for the specific JNIWrapper library.
Components of the Generic Library Wrapper Service Engine: LibWrapperServiceEngine


JBI Generic Library Wrapper Service Engine that implement the IMaper interface.

Components of the Service Unit:

JBI descriptor (jbi.xml).
WSDL that describe the Java JNI Library interface (MyLib.wsdl).
Properties file (Map.properties) used by the Generic Service Engine to define the name of the:

- WSDL (MyLib.wsdl)
- specific JNIMapper class that extends Mapper interface (mapper.JNIMapper) for dynamic loading by the SE.


3. The Library Wrapper Service Engine component

To create and build our Library Wrapper Service Engine, we will use NetBeans 6.1 as IDE tool.
List of the projects in NetBeans 6.1 needed to create and build the Library Wrapper Service Engine:


See part 4 ...

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Christophe Vaille

Search

Archives
« March 2015
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today