Skip to main content

Custom callback handler

The custom callback handler can be enabled via feature (supports both Soap and REST service):

<jaxrs:features>
    <bean class="org.talend.esb.policy.correlation.feature.CorrelationIDFeature"/>
</jaxrs:features>

<jaxws:properties>
  <entry key="correlation-id.callback-handler">
    <bean class="com.example.CorrelationHandler"/>
  </entry>
</jaxws:properties>

The bean class com.example.CorrelationHandler is a custom class which implements the org.talend.esb.policy.correlation.CorrelationIDCallbackHandler interface. If such callback class is not specified in the properties, then the correlation Id will be generated automatically by a default callback handler which provides a system UID. For more information, see Automated correlation ID generation (system UID).

It is also necessary to specify the correlation id handler:

<jaxws:properties>
  <entry key="correlation-id.callback-handler">
    <bean class="com.example.CorrelationHandler"/>
  </entry>
</jaxws:properties>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!