1

I am learning the new annotations for transaction management, like @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW), but i could not find out how to create a transaction with SERIALIZABLE isolation. Is this possible on a per-method basis or i have to set it on the connection for the whole application?

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Julio Faerman
  • 13,228
  • 9
  • 57
  • 75

2 Answers2

1

Generally transaction isolation level is set on Connection, per application.

However, e.g. in Spring on Weblogic server, you can set isolation level per transaction. See here, point 9.8.1.

amorfis
  • 15,390
  • 15
  • 77
  • 125
1

Is this possible on a per-method basis or i have to set it on the connection for the whole application?

This is not possible in a standardized way, this is not covered by the EJB specification.

But some containers do offer support for this as mentioned in How can I set isolation levels per method in EJB 3.

Community
  • 1
  • 1
Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124