Pratibha,
Doesn't it work if you put the <classpath/> in <beans/>, right before
the <camelContext/> (as a sibling to it)?
Regards,
Gert
pratibhaG wrote:
This is what I have done till now:
1)created a shared library called errorhandling
2)Put the errorhandling zip file in smx/hotdeploy
Now one of my camel component is using this shred library. This is the
camel-context.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
">
<camelContext id="Routing"
xmlns="http://activemq.apache.org/camel/schema/spring">
<package>com.in2m.servicemix.operations.updateprofile.aa</package>
</camelContext>
</beans>
This is the route
package com.in2m.servicemix.operations.updateprofile.aa;
import org.apache.camel.builder.RouteBuilder;
import com.in2m.servicemix.operations.errorhandler.ErrorConstants;
import com.in2m.servicemix.operations.errorhandler.CustomDelegateProcessor;
public class MessageRouting extends RouteBuilder {
public void configure() {
exception(java.lang.Throwable.class)
.intercept(new
CustomDelegateProcessor(ErrorConstants.SYSTEM_ERROR));
exception(java.net.SocketException.class)
.maximumRedeliveries(5)
.useExponentialBackOff()
.initialRedeliveryDelay(300000)
.backOffMultiplier(2.0)
.intercept(new
CustomDelegateProcessor(ErrorConstants.SOCKET_ERROR));
from("jbi:service:http://servicemix.in2m.com/operations/updateprofile/RoutingService")
.to("jbi:service:http://servicemix.in2m.com/operations/updateprofile/JMSProviderService?mep=in-only")
.to("jbi:service:http://servicemix.in2m.com/operations/updateprofile/ResponseGeneratorService?mep=in-out");
from("jbi:service:http://servicemix.in2m.com/operations/updateprofile/DirectorConsumerService")
.setHeader(ErrorConstants.APPLICATION_NAME,constant("jbi:service:http://servicemix.in2m.com/operations/updateprofile/DirectorService"))
.intercept(new CustomDelegateProcessor())
.to("jbi:service:http://servicemix.in2m.com/operations/updateprofile/DirectorService?mep=in-out");
from("jbi:service:http://servicemix.in2m.com/operations/updateprofile/PortalConsumerService")
.setHeader(ErrorConstants.APPLICATION_NAME,constant("jbi:service:http://servicemix.in2m.com/operations/updateprofile/PortalService"))
.intercept(new CustomDelegateProcessor())
.to("jbi:service:http://servicemix.in2m.com/operations/updateprofile/PortalService?mep=in-out");
}
}
Here when I do new CustomDelegateProcessor, I get the error given in above
message
Pratibha