accessing current transaction ID of EJB method?
"Hans J. Prueller" <[email protected]> Mon, 28 Feb 2011 12:42:02 +0100
| Newsgroups | gmane.comp.java.objectweb.jonas |
|---|---|
| Organization | LBS logics GmbH |
| Message-ID | <1298893322.1966.14.camel@smithers> |
hi all,
we are currently experimenting with EJB3-SLSB's
TransactionAttribe-Annotations on methods, especially to handle
long-running batch jobs in a correct way:
e.g. there is a single remote method of an EJB3 SLSB named:
doDataBatchProcessing
- currently method invocation takes about 1 hour which exceeds jtm
transaction timeout. as this is basically bad behaviour we want to
redesign
it to multiple short-time transactions instead of a single long-time
transaction by:
doDataBatchProcessing: TransactionAttribeType.NOT_SUPPORTED
and WITHIN doDataBatchProcessing another method is called "per client"
-
for(Client c: clients)
{
//batch proc. for specific client
batchProcessClient(c);
}
where
batchProcessClient(c) has TransactionAttributeType.REQUIRES_NEW
--> this should result in several transactions for each single client
instead of a very long running single one -- is that correct?
How can we test this - is there a way to lookup / access the current CMT
transaction ID or similar ??
thanks for any tips!
regards,
HANS