How to set isolation levels for each method in EJB 3

Is it possible to set the database isolation level (e.g. Serializable, repeatable-read, etc.) for a given EJB 3 method call?

I understand that this does not apply to the EJB Spec, so the details on how to do this on JBoss or Glassfish will be great.

I am starting to give the impression that this is not possible, and that you can only install it for the connection pool, which is clearly not an ideal solution.

+3
source share
1 answer

, . , WebLogic weblogic-ejb-jar.xml:

<transaction-isolation>
  <isolation-level>...</isolation-level>
  <method>
      <description>...</description>
      <ejb-name>...</ejb-name>
      <method-intf>...</method-intf>
      <method-name>...</method-name>
      <method-params>...</method-params>
  </method>
</transaction-isolation>

, JBoss GlassFish ( SupportWLDDInContainers, GlassFish).

Connection#setTransactionIsolation(int) EJB, , , ?

+1

Source: https://habr.com/ru/post/1703808/


All Articles