tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ravindranath Akila <>
Subject REQUIRES_NEW within a NEVER transaction throwing an exception, bug or misuse?
Date Mon, 16 Nov 2009 05:34:05 GMT
I have an operation on which

one is a dirty read, so the transaction scope is NEVER
and the other requires a transaction, hence REQUIRES_NEW.

I need to call both these in the same bean so unless I mark this caller
method otherwise, it defaults.
Therefore I tried marking it NEVER, NOT_SUPPORTED and SUPPORTS but all these
throw exceptions.

Caller Method = A


Called Methods = B and C

B => NEVER, NOT_SUPPORTED (this is the dirty read)

A calls B, then C

it seems that using ANY transaction scope, i.e. all enlisted in
transactionattribute class I cannot call both the two other methods, one not
supporting or rejecting a transaction(B) and the other requiring a new

I agree that nested transactions are not supported in EJB, but if the
caller(A) is marked NEVER, NOT_SUPPORTED or SUPPORTS, and was called from an
ordinary method(having no transaction scope), then it should not impose any
transaction to methods IT calls. It if it does, it should sleep and let them
handle it from there. I could not find anything on Google or the Sun

Please help me with this.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message