6 Replies Latest reply on Aug 12, 2007 7:48 PM by j_lalith

    Before Start we need your advice


      We are going to introduce the JBoss application server and a Persistant mechanism to our institute. Following are the questions I got.

      1) What is the exact difference between Hybernate and Ejb 3.0, Which one should we select for our Persistent mechanism. Reason is we can see both Hypernate and Ejb 3.0 are listed in the jboss product list. we are open for anything.

      2) What is the difference between jboss hybernate and hybernate as a independent project (httpd://www.hybernate.org)

      Hope this would give us the first head start and there after we would like to download the stuff

        • 1. Re: Before Start we need your advice

          1) Hibernate is the mechanism used for persistence in the JBoss AS implementation of the EJB3 spec. So you can use Hibernate directly, or via EJB3, either way Hibernate is in use.

          2) They are the same. On the JBoss.org web site, if you go to the projects page and then clinck on the Hibernate project link, you end up at hibernate.org.

          • 2. Re: Before Start we need your advice


            Thanks for the reply,

            Yes we know, ejb 3.0 also make use of Hibernate as the persistent mechanism,

            Is there any potential benefit if we go ahead with Hibernate independently instead of ejb 3.0, What are the advantages as disadvantages,

            is there any article written on this, am happy to read.

            We like to list down all the advantages vs disadvantages and then make the final call. Bottom line is what ever the persistent mechanism should be able to map the existing complex SQLs with all the OUTER joins to the persistent layer.

            Our database is Informix


            • 3. Re: Before Start we need your advice

              The entity manager API that's with EJB 3.0 is a bit more conservative (limited) compared to the full set of functionality available with Hibernate. EJB 3.0 is intended to satisfy most complex query cases, but there sure a lot of them.

              In EJB3, Queries can be written in native SQL syntax as sort of an out.

              The nice thing is, with Hibernate's EntityManager, you can access the full set of Hibernate-only functionality if you need it.

              • 4. Re: Before Start we need your advice

                Thank you so much for the reply,

                Yes you have a point, one of the ways to move forward is

                1) Jboss latest release + EJB previous release+Hibernate latest release,

                Hope above is a good combination instead of

                1) Jboss latest release + EJB 3.0 (with inbuilt hypernate)

                Hope you agree on the above

                • 5. Re: Before Start we need your advice

                  Actually, I would go with EJB 3 session beans and use Hibernate for persistence (that is, not use the Java Persistence API).

                  • 6. Re: Before Start we need your advice

                    Thanks Peter,

                    I think you refer to EJB 3.0 session beans with CMT and pure Hibernate without JTA,

                    If I put it differently, use only the EJB 3.0 session beans CMT but not the entity beans for entity beans directly use the hibernate.

                    Hope above is correct