enable JPA2.0 in weblogic server 10.3.6

比较好的文章在这里

http://docs.oracle.com/cd/E21764_01/web.1111/e13720/using_toplink.htm#EJBAD1311


Installing Manually

The files required for supporting JPA 2.0 are included with a default WebLogic Server installation, but they are not enabled by default. The files are installed in the WL_HOME\modules directory. The files are:

  • The javax.persistence_1.0.0.0_2-0-0 JAR file contains the JPA 2.0 libraries.

  • The com.oracle.jpa2support_1.0.0.0_2-0.jar file contains the files for enabling JPA 2.0 support in WebLogic Server.

If you do not have an active My Oracle Support account (which you need to use Smart Update) you can install the patch manually by putting the files at the start of the WebLogic classpath. For example, you can use either of the following ways:

  • Define a PRE_CLASSPATH environment variable before starting WebLogic Server.

    For example, in a Windows console window, run the following script before running startWebLogic.cmd:

    @echo off
    if ".%1" == "." goto TellSyntax
    set wls_modules=%1
    set PRE_CLASSPATH=%wls_modules%\javax.persistence_1.0.0.0_2-0-0.jar;
    %wls_modules%\com.oracle.jpa2support_1.0.0.0_2-0.jar
    goto End
    :TellSyntax
    echo setJPA2SupportPatch [path-to-weblogic-modules-directory
    :End
    echo PRE_CLASSPATH=%PRE_CLASSPATH%
    

    A similar script can be written for Linux, UNIX, or Macintosh.

  • Modify the commEnv.cmd or commEnv.sh script in the WL_HOME/common/bin directory, and define the PRE_CLASSPATH at the beginning of the script. 

My example at win7 will be modifying commEnv.cmd to add the below statement
@ enale JPA2.0 for weblogic 10.3.6
set PRE_CLASSPATH=%MODULES_DIR%\org.eclipse.persistence_1.2.0.0_2-3.jar;%MODULES_DIR%\javax.persistence_1.1.0.0_2-0.jar

another way is editing  setDomainEnv.cmd  and adding  javax.persistence_1.0.0.0_2-0-0.jar  and  com.oracle.jpa2support_1.0.0.0_2-0.jar  to the  PRE_CLASSPATH  environment variable as below shown.

REM Add JARs for JPA 2.0 at the front of the class path.
set WLS_MODULES=%WL_HOME%\..\modules
set PRE_CLASSPATH=%WLS_MODULES%\javax.persistence_1.0.0.0_2-0-0.jar;%WLS_MODULES%\com.oracle.jpa2support_1.0.0.0_2-0.jar


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值