Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding Spring DAO

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I am trying to learn Spring . so please help me


According to the documentation

Spring Framework provides excellent DAO support including TransactionManagement and Exception Handling
With Spring Framework , DAO support is provided for JDBC, Hibernate, iBATIS, Java Data Objects (JDO),


Now i have a query .
For example if i am working with Hibernate then do i need to extend HibernateDAOSuppourt will then only My DAo class will be avialable to Spring Framework otherwise not .

Thanks in advance .





 
Eduardo Bueno
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your question. HibernateDaoSupport is a class inside Spring ORM package; if you want to use both frameworks, that's the proper way.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks for the response .

Just now i had seen a another example in which the DAOImplementaion class doesn't extend the HibernateDAOSuppourt class .







This class simply implements the DAO interface .

Please tell me i am getting confused .
 
Eduardo Bueno
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be also useful to you.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was really nice link .Thanks once again .

It clearly shows why to go for Template Less and Template Supppourt of Spring Framework

But i still can't understand one thing here , Templates are providing a lot of benifits like Converting Exceptions (short for try/catch-finally-try/catch) the transaction management and resource management concerns are also addressed .

So keeping so much beneferies in Spring Template why the author itself prefers to go with Direct Hibernate rather than using Template Suppourt .


Thanks in advance .
 
Eduardo Bueno
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't answer that for you, but I have a theory: although Spring is a huge IoC manager, it is clinging more to the AOP development. That is where use the Session as a Spring proxy is more valuable than use it directly with hibernate.

Anyways, let's hope someone wiser can answer that for us.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic