Embedding JCA Messages

I am developing a JCA adapter, and I have some doubts about my implementation for incoming messages. Use case: I need to send some work to EIS and include the URL as a parameter. When EIS shuts down, it calls the URL as a notification.

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

So I would like to know if this is considered a proper implementation or if there is a better way to do this. Thank you in advance.

Hello,

Kh

+4
source share
2 answers

Yes, it looks great to listen on the port for a response that will come from EIS in the future. You will need to use JCA Work objects to wait for such responses.

If you prefer the HTTP communication method, you probably have to use some HTTP library procedure to parse the HTTP message and get the parameters from it. As another option, you can also use a simple TCP message containing several name-value pairs for data that you would otherwise use in these "HTTP parameters".

NTN. Thanks, Nitin

+2
source

JCA Sockets may have what you need - it mainly uses this technique and is open source, so you can see how it is done. Please note that with some application servers there may be problems with reliability.

+2
source

Source: https://habr.com/ru/post/1332983/


All Articles