Configure hibernate as JNDI on WebLogic

Source: Internet
Author: User

1. First, you must put the jar packages and configuration files used by hibernate on the classpath path that WebLogic can search. Many people are confused about this step. In fact, let's take a closer look at the startup script files startweblogic. CMD and startwls. CMD of weblogic. I think most people know how to configure it.

There is a hibernate project on my machine. Under the D: estoracle directory, the structure of this directory is:

D: estoraclelib: Place all the jar packages of hibernate.
D: Place estoraclesrcSource code
D: compiled by estoracleclassesCodeAnd hibernate configuration files (hibernate. properties, log4j. properties, cache. CCF)

Now we need to place the jar files and the D: estoracleclasses directories under the D: estoraclelib Directory into the Weblogic classpath. Therefore, we need to modify the Weblogic STARTUP script startweblogic in mydomain. CMD: Before Weblogic is started, insert the classpath setting command as follows:

@ REM set hibernate classpath
Set hibernate_lib = D: estpoliclelib
Set hibernate_classes = D: estoracleclasses
Set classpath = % classpath %; % hibernate_lib % cglib-asm.jar; % hibernate_lib % commons-beanutils.jar;
% Hibernate_lib % commons-collections.jar; % hibernate_lib % commons-lang.jar;
% Hibernate_lib % commons-logging.jar; % hibernate_lib % dom4j-full.jar;
% Hibernate_lib % hibernate2.jar; % hibernate_lib % JCs. jar;
% Hibernate_lib % log4j-1.2.8.jar; % hibernate_lib % ODMG. jar;
% Hibernate_lib % JTA. jar; % hibernate_classes %;

The following line is the startup command in the script:

@ REM call WebLogic Server
Call "C:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.