2 Replies Latest reply on Mar 15, 2005 9:22 AM by Magnus Sandberg

    Possible to Ignore Classes in Deployment?

    Magnus Sandberg Novice


      I'm trying to use Hibernate3 'by hand' with EJB3 since I need to control the Hibernate SessionFacory. I want to use Hibernate-POJOs with EJB3-SessionBeans. Is this or will this be possible in some structured manner?

      I guess that I can use Hibernate-XML to define my Entities but is it possible to use Annotated Hibernate-Enteties and force EJB3 to skip the classes that I need Hibernate to handle direct?



        • 1. Re: Possible to Ignore Classes in Deployment?
          Bill Burke Master

          not right now...We still need to define how EntityManager can be identified as well just finish the specification before we can get to how this integrates with Hibernate.

          Can you give more detail to your requirements here on forum? AFter a bit of discussion we'll schedule it for another preview release.

          • 2. Re: Possible to Ignore Classes in Deployment?
            Magnus Sandberg Novice

            I have played around some and there're a few things to add.

            The first problem is that Hibernate-Annotate and EJB3 are using diffrent classes for annotations (ejb.* vs persistence.*) as well as diffrent versions of Hibernate - but this will go away when things gets a bit more stable.

            Currently to avoid some problems I have to build an ear file with one ejb3 archive that has a Class-Path to a jar with the Hibernate POJOs. To this jar I have also added classes from the HAR deployer to join the Hibernate Session to the Transaction.

            In the future I guess it will be possible to deploy ejb3 with the ejb3 deployer and the Hibernate classes with the HAR deployer (as soon as there's a version for hb3). Maybe this is the gernerall long term solution?

            For me this is not good enought since I need to rebuild the SessionFactory at runtime from time to time - but this will also be a lot easier when all componens are using the same versions of the Annotations and Hibernate.

            For me it would be nice if I could add Hibernate Annotated Entitys to the ejb3 archive without them beeing picked up by the EJB3 EntityManager.