1 Reply Latest reply on Aug 26, 2013 8:49 AM by Claus Ibsen

    Using Hibernate within Camel

    Eric Bender Newbie

      Hello, I've been doing some reading around utilizing camel for pojo to database mapping, and surprisingly I haven't found a lot of information.   I have found some information regarding the camel-hibernate bundle from https://code.google.com/a/apache-extras.org/p/camel-extra/source/browse/trunk/examples/camel-example-hibernate/pom.xml but since I am running servicemix 4.4.1 which relies on camel 2.8, I am not sure how I can really leverage this since it appears to be mainly for camel 2.12.

       

      Is there information I am not finding on utilizing hibernate?  I see some JPA related features, but that seems to add a complexity to the hibernate usage that doesn't necessarily need to be there.

       

      I just have a handful of tables I'd rather avoid writing SQL directly against, but leverage the ability for hibernate to put populated pojos on the exchange for use processing down the line.

       

      Any help, thoughts or input are greatly appreciated.

        • 1. Re: Using Hibernate within Camel
          Claus Ibsen Master

          Hibernate 4.x onwards is becoming OSGi compliant. So if you can then I suggest to use latest Hibernate releases.

           

          You can use camel-jpa / native JPA with Hibernate as its also JPA compliant.

           

          At Camel Extra there is a camel-hibernate component that in the 2.12 release has been refactored to use Hibernate 4.x API.

           

          Though for older releases of Hibernate and SMX then some ppl got it working. Maybe search the web a bit.

           

          And btw this forum is for Fuse ESB products. If you use vanilla Apache ServiceMix, then maybe use their forum / mailing list instead.