CrawlingKid
CrawlingKid

Reputation: 994

How to integrate Apache Camel with Jersey 2.x?

I have been trying to integrate apache camel with Jersey 2.x. Basically, i have some rest api implements using Jersey. For some special requirements, i am forced to use camel routes for representing rest endpoints.

I was searching tutorial, but could not find any.

But, I have found such as Apache camel with Spring boot sample-> and spring-boot-sample-jersey. I was trying to combining those two. But I am not sure whether it is a right approach or not.

I have found Apache Camel could work well with Apache CXF. But my requirement is to integrate Jersey with Apache Camel.

Could you suggest any idea or tutorials for integrating Jersey with Apache Camel?

Notes: I have checked: Camel-Jersey Integration, which did not fulfill my requirements.

Upvotes: 1

Views: 1137

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55545

There is no first class camel-jersey component.

However you can call Camel from Jersey in the JAX-RS resource class.

There is a little example here, but its using CXF (not camel-cxf) as the example. But you could do similar with Jersey instead of CXF: https://github.com/camelinaction/camelinaction2/tree/master/chapter10/cxf-rest-camel

Upvotes: 2

Related Questions