5 Replies Latest reply: Jul 21, 2012 8:29 AM by murali veligeti - oracle RSS

    is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?

    801933
      as captioned, is oracle weblogic 10.3.4 or 10.3.5 only support its own persistence provider, but not others like hibernate?
        • 1. Re: is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?
          murali veligeti - oracle
          Hi,

          Both WLS 10.3.4 and WLS 10.3.5 supports hibernate.

          Thanks & Regards,
          Murali.
          ============
          • 2. Re: is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?
            801933
            is the following right:
            by default, weblogic 10.3.4 use toplink/eclipselink and jpa 1.0 if not apply patch, but in our application, we can specify to use hibernate in <provider> tag of persistence.xml and if that hibernate version jar allow jpa2.0, then no need to upgrade the weblogic patch, can still use hibernate and jpa2.0 function?
            • 3. Re: is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?
              murali veligeti - oracle
              Hi,

              To enable JPA 2.0 support in WLS 10.3.4, you must download and install a WebLogic Server patch 9923849


              You should download hibernate jar and place in classpath

              WebLogic Server includes a lib subdirectory, located in the domain directory, that you can use to add one or more JAR files to the WebLogic Server system classpath when servers start up. The lib subdirectory is intended for JAR files that change infrequently and are required by all or most applications deployed in the server, or by WebLogic Server itself. You can use the lib directory to store third-party utility classes that are required by all deployments in a domain. If you update a JAR in the lib directory, you must reboot all servers in the domain in order for applications to realize the change.If you need to share a JAR file or Java EE modules among several applications, use the Java EE shared library feature.

              For using hibernate as a persistence layer, you should change persistence.xml like this:
              <persistence-unit name="reviewService"
                        transaction-type="JTA">
                        <provider>org.hibernate.ejb.HibernatePersistence</provider>
                        <jta-data-source>TestDatasource</jta-data-source>
                        <properties>
                             <property name="hibernate.transaction.manager_lookup_class"
                                  value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
                        </properties>
              </persistence-unit>


              Thanks & Regards,
              Murali.
              =============
              • 4. Re: is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?
                801933
                I have no oracle support ID.
                but reference to
                [http://docs.oracle.com/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309|http://docs.oracle.com/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309]
                installing manually part, I modify the commEnv.cmd as follow:
                @rem http://docs.oracle.com/cd/E17904_01/web.1111/e13720/using_toplink.htm#EJBAD1309
                @rem enabling jpa2.0
                set PRE_CLASSPATH=C:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar;
                C:\Oracle\Middleware\modules\com.oracle.jpa2support_1.0.0.0_2-0.jar
                echo PRE_CLASSPATH=%PRE_CLASSPATH%

                @rem Set BEA Home
                set BEA_HOME=C:\Oracle\Middleware

                is my WLS 10.3.4 support JPA 2.0 now? how to test it?
                • 5. Re: is oracle 10.3.4 only support toplink (or eclipselink), but not hibernate?
                  murali veligeti - oracle
                  Hi,

                  If you don't have Oracle Support ID you can make container JPA 2.0 complaint by following the below URL

                  http://docs.oracle.com/cd/E17904_01/web.1111/e13720/using_toplink.htm#CIHDGHFE

                  If JPA 2.0 jar javax.persistence_1.0.0.0_2-0-0.jar is picked up during the start of server and during startup this JAR should load first. Then the container becomes JPA 2.0 Complaint.

                  To test, you need to write a sample JPA 2.0 complaint program and test.

                  Thanks & Regards,
                  Murali.
                  ============