posted 17 years ago
Hi,
Can anyone help me out ?
I am using Stateless session bean. In my bean, I call BO class which performs business validations and then , call Data Access Object class
(say, class A) .The class , A updates Db2 database table A, then, calls Data Access Object class B which updates database table B and class A then calls Data Access Object C which updates tables C.All the above are performed in the same DAO class A's method.
TheEJB method transaction attribute has been set to Required.
My question is can I pass the same connection from class A to class B and C. Or,is it good to use separate connections (fetched from the connection pool) in class A,B and C ?
I know both ways will work. Can someone say me which will be faster and better than the other.
Thanks in advance.