File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Sample For oracle

 
punna Kumar
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks mahesh,

can you provide the directory structre for the hibernate.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic