This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.
  • 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:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

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: 27492
195
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: 27492
195
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:


 
Bras cause cancer. And tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic