ISM Socket Connector 만들기

Overview

BusinessWare provides basic socket connector to communicate with external systems via socket. This connector can process only one request at one time. It is not useful to process many concurrent requests. It cannot configure message length for each request. ISM Socket connector is designed to address concurrent requests in a configurable way. There are two types of ISM Socket Connector. One is source and the other is target. ISM Socket connector assumes incoming request/response contains length information somewhere in the message. As a source connector,

  • the first thing socket connector does is check the message length.
  • After message length is determined, socket connector tries to read message until the message length.
  • Message length can be a part of whole message or not.
  • In either case, socket connector reads message from connected socket and forwards to BusinessWare framework.
  • BusinessWare framework dispatches that message, more precisely that is called as a event, to process model.

As a target connector

  • ISM Socket Connector connects to target system and sends message.
  • If the message is synchronous type, ISM Socket Connector waits response from target system until timeout seconds, otherwise just return.

Installation

Deploy ISM Socket connector to LDAP $>vtadmin deploy project ISMSocketConnector.jar Copy ISM Socket connector jar file to your BME environment. $>copy ISMSocketConnector.jar %VITRIA%/bme/modules

Source connector

When you open your BME after installation, you can see ISM Socket Connector() in connector palette.

Usage

Drag and drop source connector to integration model.

Wire the output port of source connector to input port of a process model.

Click output port of source connector, then property window will be displayed.

Click Port Types and open Edit Types dialog.

Click Browse button

In Choose Interface dialog, choose operations of ISMSocketConnector Click OK button to close Choose Interface dialog. Click OK Button to close Edit Types dialog. Now output port type of source connector is set.

Input port type of process model is automatically set according to the output port type of wired source connector. Open process model and click the transition from start to Action.

Click Trigger Type button and choose binaryMessage.

Click transition from Action to end and choose defaultEvent.

Right click the process model and choose Tools->Entry Action Code. data parameter is the message received via socket.

Do your work with data parameter.

Source Connector Properties

Property Description Remarks
Name Connector name in integration model
Batch Commit Number Transaction count to be commit in one transaction It is not used in socket communication.
Transactionality Transaction attribute of this connector Non-transactional
Exception Handler Exception handler class used to handle exception If not defined, default exception handler is used.
Listening port Socket listening port Default port is 33000.
Additional ports for multipart listening Additional listening port list Separated by comma(,)
Host Socket listening ip or hostname If localhost is set, listening ip is same with integration server listening ip. If integration server is listening on a virtual ip address, socket connector also uses virtual ip address.
ReadTimeout Socket read timeout Seconds.
Last Bytes indicator for the end of a message It is used only when last byte indicator exists. Otherwise leave it blank.
Last Bytes Length Length of Last byte indicator It is used only when last byte indicator exists. Otherwise set 0.
Length Field Length The length of message length field Field length of message length field.
Length Field Offset The offset of message length field
Is total length Whether message length field is included in whole length True : message length field is included in whole length.
False : message length field is not included in whole length.
Message Handler Class Handler class to be used to extract whole length and request type - synchronous/asynchronous If not defined, default handler class is used.
Max length Max length of a message Bytes. Default is almost 1MB.
Sync Pattern Offset The offset of request type indicator
Sync Pattern Length The length of request type indicator
Sync Pattern Regular expression for synchronous request
Async Pattern Regular expression for asynchronous request
Max Thread Count Max concurrent session
Allowed List for allowed ip address

Target Connector Properties

Property Description Remarks
Name Connector name in integration model
Transactionality Transaction attribute of this connector Non-transactional
Exception Handler Exception handler class used to handle exception If not defined, default exception handler is used.
Socket Connection Reuse The flag for connection reuse Y : socket connections are maintained in a pool and reused in later transactions.
ReadTimeout Socket read timeout Seconds.
Last Bytes indicator for the end of a message It is used only when last byte indicator exists. Otherwise leave it blank.
Last Bytes Length Length of Last byte indicator It is used only when last byte indicator exists. Otherwise set 0.
Length Field Length The length of message length field Field length of message length field.
Length Field Offset The offset of message length field
Is total length Whether message length field is included in whole length True : message length field is included in whole length.
False : message length field is not included in whole length.
Message Handler Class Handler class to be used to extract whole length and request type - synchronous/asynchronous If not defined, default handler class is used.
Max length Max length of a message Bytes. Default is almost 1MB.
Sync Pattern Offset The offset of request type indicator
Sync Pattern Length The length of request type indicator
Sync Pattern Regular expression for synchronous request
Async Pattern Regular expression for asynchronous request
Last Pattern Offset The offset of last message indicator
Last Pattern Length The length of last message indicator
Last Message Pattern Regular expression for last message
More Message Pattern Regular expression for additional message