1 Reply Latest reply on Feb 16, 2011 7:19 AM by jan piel

    How to configure hibernate in JBoss

    just lee Newbie

      As there is jar conflict errors between hibernate3.jar in my project ear and the hibernate jars in JBoss itself (version 6.0.0.Final), I am trying to use the hibernate jars from JBoss instead of original hibernate3.jar. Could anyone suggest how to configure and use the hibernate from JBoss itself? I heard from internet that we need to configure a hibernatexxx.har under Deploy directory?

        • 1. How to configure hibernate in JBoss
          jan piel Newbie

          You should use the persistence-specification from EJB3 because then you are independent from the specific persistence-framework of the J2EE-server. For example javax.persistence.Entity instead of org.hibernate.annotations.Entity. The J2EE Server has to manage this specification by a concrete framework(for example Hibernate).

          To bound the jars bind a server runtime in the properties of your ejb-project and you include all jars from the JBoss. In eclipse you bind the server runtime by going to properties-of-project -> Java Build Path -> Libraries -> Add Library -> Server Runtime -> and the select the defined server.