Search code examples
jakarta-eejava-ee-6ejb-3.1

How can i use serializable transactions on Java EE 6?


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?


Solution

  • 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.