aspose file tools*
The moose likes Object Relational Mapping and the fly likes Servlet + Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Servlet + Hibernate" Watch "Servlet + Hibernate" New topic
Author

Servlet + Hibernate

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Can servlets be integrated with Hibernate?


kunal
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Not sure what you mean by "integrate", but Hibernate is frequently used in Java web apps. Being DB-related it should generally be in a layer that's separate from the web layer (i.e., the servlet), so the class extending HttpServlet would not normally have Hibernate code in it.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Thanks for reply. I mean that can it be used in DAO classes?
I have a pojo class, a servlet class, and a DAO(containing db related stuff) class.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
You can use it wherever you want to. I was merely pointing out that DB code and servlet code should be separated.
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Thanks for you reply Tim. I will try and will post here if i face any difficulty.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet + Hibernate
 
Similar Threads
[SCBCD 5.0] Simplified (reduced) SELECT clause form
Where to put questions regarding Hybernet?
Good books or tutorial site for JDO
how to cast String to Clob ?
WA #1.....word association