camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davide_cavestro <>
Subject Package visibility for RedeliveryErrorHandler.RedeliveryData.currentRedeliveryPolicy
Date Fri, 17 Feb 2017 15:09:45 GMT
I need to enrich the /RedeliveryPolicy/ with custom attributes, so I have
subclassed it.
Then I subclassed /DefaultExceptionPolicyStrategy/ in order to properly map
custom /RedeliveryPolicy/ instances to exception types.
On a /Processor/ configured as
/DeadLetterChannelBuilder.onExceptionOccurred/ I need to get access to
/currentRedeliveryPolicy/ and its custom attributes,  so I subclassed
/DeadLetterChannel/ in order to intercept the /RedeliveryData/ parameter of
/DeadLetterChannel.onExceptionOccurred/ method calls and save its
/currentRedeliveryPolicy/ into an exchange property.

So far it's UGLY.

But at this point I've seen that
/RedeliveryErrorHandler.RedeliveryData.currentRedeliveryPolicy/ has package
visibility, so I need to introduce a class with package
/org.apache.camel.processor/ just to access that field.

The problem is that this easily becomes a MESS when I try to run this in an
OSGi environment, cause it makes /org.apache.camel.processor/ a splitted

Is there any better way to achieve the same?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message