Anything equivalent for @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) in seam?

StackOverflow https://stackoverflow.com/questions/4656190

Pergunta

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?

Foi útil?

Solução

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;
...
   }
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top