Announcement Announcement Module
No announcement yet.
Spring DAO with Hibernate Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring DAO with Hibernate

    HI ALL,

    im developing an application struts2.x,Hibernate 3.2 with support of Spring IOC AND DAO.

    i heard that in spring "basedao class" is extended by all hibernate plain dao's. for this anybody have ant script for that?

    Thanks In Advance


  • #2
    I suggest you read the reference guide and also take a look at the sample applications. In the case of Hibernate and/or JPA we advice to NOT extend our base dao classes or use the template classes. Simply create a plain dao based on the SessionFactory and use the getCurrentSession method to get a session.

    That way you will get Spring integration and a dao without any reference to spring.


    • #3

      i give overview of my application. i already created hibernate pojo's and related mapping files. And i also created my Manager and their impl classes. what im doing here is for team lead is supplied me an build.xml. when im running it for each pojo one dao is generating. This generated dao is implementing the spring base dao class(it have the all CRUD operation). In application context i configure the manager's and dao's and using these dao's in my manager impl classes.

      my question:

      how can i create these dao's and spring base dao using ant? in my ant the code is very critical. they are using some XLS FILE Code.

      any easy ant script to generate these dao's?