Search code examples
socketsjcainbound

JCA Inbound Messaging Implementation


I am developing a JCA adapter and I have some doubts about my implementation for inbound messaging. The use case is I need to submit some job to EIS and include a URL as a parameter. When EIS completes the job, it invokes the URL as a notification.

The only way I can think of is to open a ServerSocket at one port, pass my server IP + port as URL to EIS. When HTTP request comes in from EIS, parse it to get the parameters.

So I would like to know if it is considered a proper implementation or if there is any better way to do it. Thanks in advance.

Regards,

K.H


Solution

  • Yes, it looks fine to listen on a port for the response which would come from the EIS sometime in future. You will have to use JCA Work objects for waiting for such responses.

    If you prefer the HTTP way of communication, you would probably have to use some HTTP library routine to parse the HTTP message and get the parameters out of it. As another option, you can also use a simple TCP message containing some name-value pairs for the data which you would otherwise put into those "HTTP parameters".

    HTH. Thanks, Nitin