Petals-SE-POJO 2.5.0+

compared with
Current by Christophe DENEUX
on Mar 14, 2018 09:28.

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

Changes (1)

View Page History
Note that once a {{sendAsync(...)}} has expired, the POJO does not have the ownership of the exchange anymore (because it was sent but never came back) and can't access anything else than the exchangeId and the exchange status! The {{AsyncContext}}, which can be subclassed when needed, is there to store needed information in these situations.

h3. Accessing placeholders

If some configuration parameters are needed for your service provider, you will use properties defined in the properties file configured at component level (see parameter {{properties-file}}).

And so your properties can be accessed through the following API:
{code:lang=java}
jbiListener.getComponent().getPlaceHolders().getProperty("your-property-name")
{code}
where {{jbiListener}} is the JBI listener transmitted through methods {{onExchange(...)}}, {{onAsyncExchange(...)}} or {{onExpiredAsyncJBIMessage(...)}} of your POJO class.

h2. Service Configuration