| Author |
Regarding Spring DAO
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
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 .
|
Save India From Corruption - Anna Hazare.
|
 |
Eduardo Bueno
Ranch Hand
Joined: Jun 04, 2009
Posts: 154
|
|
|
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
Joined: Apr 18, 2009
Posts: 2234
|
|
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
Joined: Jun 04, 2009
Posts: 154
|
|
|
This may be also useful to you.
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
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
Joined: Jun 04, 2009
Posts: 154
|
|
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.
|
 |
 |
|
|
subject: Regarding Spring DAO
|
|
|