File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate Sample For oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Sample For oracle" Watch "Hibernate Sample For oracle" New topic
Author

Hibernate Sample For oracle

punna Kumar
Ranch Hand

Joined: Feb 28, 2005
Posts: 80
Hi ,
i am very very newbi to the Hiberante. i started learning Hibernate. any one give the like or sample programs for Oracle. i search for examples all are in HSQL Database only.


if any one have the oracle samples with config files please post.


Ravi
Mahesh Gurav
Greenhorn

Joined: Oct 18, 2004
Posts: 21
hi,
You said ::sample programs for Oracle. i search for examples all are in HSQL Database only.
But hibernate is used to make your application decoupled from Database layer.So it should work with all databases with minor change in one Configuration file.This file is hibernate.cfg.xml.make few changes as shown below & your sample programs will be compatible with oracle DB.the configuration shown below is for Non-managed envioronment.plz find Dialects for different databases in hibernate-3.0\src\org\hibernate\dialect if you downloaded hhibernate3.For examples & other information see
hibernate-3.0\doc\reference\en\pdf.
<!-- Local connection properties -->
<property name="connection.url">
jdbc racle:thin:@admini:1521 racle
</property>
<!-- driver Class -->
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>

<property name="hibernate.transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory
</property>
<!-- Oracle Dialect -->
<property name="dialect">
net.sf.hibernate.dialect.OracleDialect
</property>

Mahesh
punna Kumar
Ranch Hand

Joined: Feb 28, 2005
Posts: 80
thanks mahesh,

can you provide the directory structre for the hibernate.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by punna Kumar:
thanks mahesh,

can you provide the directory structre for the hibernate.


Can you explain what you mean by "directory structure"? Hibernate is just some Jar files and doesn't require any particular directory structure.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Sample For oracle