4 Replies Latest reply on Mar 12, 2012 11:14 AM by smarlow

    jpa subsystem with hibernate3

    jdabrowski

      On JBoss7.1.0.Final I don't know if it should work like this or not but when I deploy simple ejb jar with persistence.xml I can see jpa subsystem in console.

       

      But with

      <property name="jboss.as.jpa.providerModule" value="org.hibernate:3" />
      

      there is no jpa subsystem.

       

      Can someone tell me if it's correct?

        • 1. Re: jpa subsystem with hibernate3
          smarlow

          Its not clear from your description.  Next time, attaching or pasting the console output might help.

           

          The Hibernate 3.x jars are not included.  You can either packaged Hibernate 3 jars with your application or create a AS7/modules/org/hibernate/3 folder that contains the jars.  Documentation for both options is here.

           

          Scott

          • 2. Re: jpa subsystem with hibernate3
            jdabrowski

            Once again with better explanation:

             

            I have an ejb module which I deploy on JBoss7.1.0.Final. Module contains persistence.xml with persistence unit definition.

            After deploying it I can see jpa subsystem in cli and persistence unit in web console.

             

            When I change my persistence.xml to use hibernate:3 (I have all required packages in modules and it works great) there is no jpa subsystem for this module and I can't see my persistence unit in web console.

            • 3. Re: jpa subsystem with hibernate3
              smarlow

              Oh, that console!  I thought you meant something else (like a deployment failure in the AS server console).

               

              I added the web console support only for Hibernate:4, because that is what everyone should be using (its shiny and new

               

              There are a few ways to make hibernate:3 show up in the console, but that will require code changes.  The hibernate:3 adapter currently doesn't contain the management console/cli code.  This is something that I would like to implement in the future but it hasn't been a priority yet.  The web console itself will also need to be enhanced to show Hibernate:3 (but the cli will not need any changes).

               

              If you or others are interested in helping with this, we can discuss further.

              • 4. Re: jpa subsystem with hibernate3
                smarlow

                Correction, if we added hibernate:3 management console support, it would probably reuse what we already did for hibernate:4.  The AS7 source for the hibernate:4 adapter is here.  Sources for hibernate:3 adapter are here.  Guide to getting started with hacking as7 is here.