posted 16 years ago
@Stateless
@TransactionManagement(CONTINER)
public class MySessionBean implements MySession
{
@TransactionAttribute(REQUIRED)
public void methodA()
{
. . . .
methodB(); // call to non business method
}
@TransactionAttribute(REQUIRED_NEW)
private void methodB()
{
}
}
//business interface
@Remote
public interface MySession
{
public void methodA();
}
As for core spec page no 330
Only these methods can specify transaction attribute
The enterprise bean�s business methods, message listener methods, business method interceptor methods,
lifecycle callback interceptor methods, or timeout callback method
Considering this we can not specify transaction attribute on methodB() which is not a business method. But I am not sure why ?
Please correct me if I am wrong. Is my understanding is wrong ?
Thanks
Pavan Kumar
[ May 21, 2008: Message edited by: Pavan Shahi ]
[ May 21, 2008: Message edited by: Pavan Shahi ]
[ May 21, 2008: Message edited by: Pavan Shahi ]
SCJP 1.4 (93%)<br />SCBCD 5 (96%)