Petals-SE-POJO 2.0.x

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
}

public boolean onExpiredAsyncJBIMessage(Exchange subExchange, AsyncContext asyncContext)
throws MessagingException {
[...Handle here the subExchange timeout...]
return false;
}

public void init() {
Any asynchronous response from the 'sub-exchange' comes back in the {{onAsyncExchange(Exchange subExchange, AsyncContext asyncContext)}} method. During the process of this method, the 'sub-exchange' must be handled according to the MEP, and the returns {{true}} of the method let the CDK send the 'sub-exchange' to the partner.
Once all 'sub-exchanges' are received, the 'original' exchange can be retrieve from the asynchronous context and the response or acknowledgement send back explicitly.
If a 'sub-service' do not response at time, the {{onExpiredAsyncJBIMessage(...)}} method will be invoked by the CDK. You must handle the timeout of the 'sub-exchange' in this method.


{table-plus}


|| Parameter || Description || Default || Required ||
| class-name | The name of the Java class to expose as a service. | {center}\-{center} | {center}Yes{center} |