Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

s vai

Greenhorn
+ Follow
since May 29, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by s vai

hey Chris,

thanks a lot...at least i got someone to support what i was thinking abt....lets hope somebody puts more light on it.....

11 years ago
hey Chris

thanks a lot for your input...

actually i made a mistake while posting the post... sorry for that ...but when i replace "getHibernateTransactionTemplate()" with "getTransactionTemplate()" which actually uses datasourcetransactionManager the code and flow works just fine....why??? if i use HibernateTemplate in DAO layer you say i "must" (correct me if i am wrong) use HibernateTransactionTemplate...if yes then i am violating this by using DatasourceTransactionManager.......and still all is well...

where exactly my code would break if i use DatasourceTrnsactionManager instead of HibernateTransactinManager

Please disillusion me from this confusion
11 years ago
Hi Following are some of relavent code snippets from my project...What i want ot ask is that whether one must use HibernateTransactionManager if he is using Hibernate in DAO classes to fire queries. Because we are accidentally using DatasourceTransactionManager with Hibernate Query Language in DAO implementation classes. Please calrify my doubts .According to me it shouldn't matter which transaction management strategy we are using...wat say??

My applicationcontext.xml



My BasetransactionAction which get a Particular transactionManager Instance and starts the transaction


My BaseAction class which provides various methods to get differenct types of transaction templates and hence different types of transaction managers:



one of my action classes which gives call to UserServiceserviceImpl class


My UserServiceImpl class whioch ultimately gives call to UserDAOImpl
(friend);

} catch (Exception e) {
throw new BusinessException(e);
}

return null;
}
}
[/code]
Finally My UserDAO implementation for the above service method
11 years ago