I am using container managed transactions
A) in few methods i have transaction attribute as required
B) in few methods i have transaction attribute as supports
thus sometimes a method firing only select queris (methods in B) may be in transaction if called from A, or sometimes not in transaction if called directly
on getting any exception, i want to rollback transaction
using SessionContext.getUserTransaction() gives illegal state exception
sessionContext.setRollBackOnly() gives illegal state exception
the
j2ee docs says that for container managed transcations THESE METHODS CANNOT BE CALLED
now, the question is how do i know in my ejb code whether current code is running under transactions or not !
Kalpesh Soni [ July 28, 2007: Message edited by: Kalpesh Soni ]