HIBERNATE JBoss.org
 |  Register  | 
     
News 
About 
   Feature List 
   Road Map 
Documentation 
   Related Projects 
   External Documentation 
Download 
Forum & Mailinglists 
Support & Training 
JIRA Issue Tracking
Wiki Community Area


Hibernate Public Training Courses


Get Hibernate in Action eBook!


JavaWorld 2003 Finalist


Jolt Award 2004 Winner
      
Documentation > Community Area > Middlegen for Hibernate > Comments > Middlegen and DB2 !!!


Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
Subject: Middlegen and DB2 !!! 11 Mar 2004, 16:15
From: ChrisR Replies: 1, Views: 354
 
ernani,

   Your \config\database\db2.xml file should look something like the 
following. I have DB2 installed to c:\sqllib.


   <!-- 
=================================================================== -->
   <!-- ant properties/targets for IBM 
DB2                                   -->
   <!-- note: this is not a proper xml file (there is no root 
element)      -->
   <!--       it is intended to be imported from a *real* xml 
file          -->
   <!-- 
=================================================================== -->

   <property name="sqllib.home"                    value="C:/sqllib"/>
   <property name="database.script.file"           
value="${src.dir}/sql/${name}-db2.sql"/>
   <property name="database.driver.file"           
value="${sqllib.home}/java/db2java.zip"/>
   <property name="database.driver.classpath"      
value="${database.driver.file}"/>
   <property name="database.driver"                
value="COM.ibm.db2.jdbc.app.DB2Driver"/>
   <property name="database.url"                   
value="jdbc:db2:SAMPLE"/>
   <property name="database.userid"                value="userid"/>
   <property name="database.password"              value="password"/>
   <property name="database.schema"                value="CLEX"/>
   <property name="database.catalog"               value=""/>


Your build.xml should contain the following...

<!DOCTYPE project [
    <!ENTITY database SYSTEM "file:./config/database/db2.xml">
]>

See if those work for you

Cheers
Chris
 

Thread:
 Middlegen and DB2 !!! 
 ChrisR   11 Mar 2004, 16:15 
 Re: Middlegen and DB2 !!! 
 cpalit   18 Mar 2004, 01:01 
      

coWiki