This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Looking for Sample Project

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am learning hibernate and looking for a sample project with several class files using hibernate.

Things i need help with learning
-Session management = I have created Employee, EmployeeDAO interface, and EmployeeDAOImpl implementation classes all being controlled by Main.java .  The classes will have create, read, update, delete methods and i need a better example of how to handle sessions, transactions, and close out in each method.  
-How to move the xml mapping from hibernate.cfg.xml for Employee class to the EmployeDAOImpl methods
      Go from this

       To

thanks

 
Saloon Keeper
Posts: 24825
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're looking for an antique form of Hibernate. Your samples are all original (legacy) Hibernate.

I don't recommend using legacy Hibernate. Use Hibernate JPA. Hibernate JPA, unlike the original Hibernate is supported by the JEE EJB3/JPA standard. In fact, Hibernate was a big part of designing the JPA standard. So you can pretty well assume that Hibernate JPA will be taking part in all of the latest ORM features. You can't assure that legacy Hibernate will. For that matter, it's likely that some day Hibernate will drop legacy support entirely.

As it happens, I do have an open-source web application using Hibernate JPA under the Spring Data framework and it's available for anyone to view and for that matter, to contribute to. If you're interested. I've been using this technology for quite a few years now on various applications.
 
ryan bohnert
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any good youtube videos that you recommend for Hibernate JPA?

I have been watching this Hibernate video https://www.youtube.com/watch?v=JR7-EdxDSf0

And using this in my project

 
Tim Holloway
Saloon Keeper
Posts: 24825
172
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. I'm allergic to videos. I prefer books and blogs.

Here's part of my Hibernate JPA POM, but there's more since as I said, I use Spring Data JPA to handle the ugly bits:


 
reply
    Bookmark Topic Watch Topic
  • New Topic