Reputation: 24499
I need to have a @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
and in a non EJB enviroment, how can we get the same using @Transactional
in Seam?
Is any of the values the same as REQUIRES_NEW?
REQUIRED,
MANDATORY,
SUPPORTS,
NEVER
Or is there maybe some other annotation for this?
Upvotes: 2
Views: 608
Reputation: 14656
As you say, you would use @Transactional for non EJB environments, which comes with the 4 types you listed.
I vaguely remember that I read something about a new type "REQUIRES_NEW" in the developer mailing-list, which I found here:
Only problem is that it seems as if the patch never made it into trunk, I have 2.2.1.CR1 on my machine and TransactionPropagationType reads like this:
public enum TransactionPropagationType
{
REQUIRED,
MANDATORY,
SUPPORTS,
NEVER;
...
}
Upvotes: 1