5 Isolation level constants are defined in the connection interface
Connection.transaction_NONE -Transaction not supported
Connection.transaction_read_uncommitted -Dirty reads (transaction rollback results in inaccurate data being read by other transactions), non-repeatable reads and phantom reads can occur
Connection.transaction_read_committed --Non-repeatable reading and phantom reading can occur
Connection.transaction_repeatable_read – Phantom reading occurs (table One Records students, table two records table one statistics. )
Connection.transaction_SERIALIZABLE --Serializable transactions
Javax.ejb.TransactionAttributeType the transaction properties defined in the enumeration:
Transactionattributetype. MANDATORY
If a client invokes the enterprise bean ' s method while the client was associated with a transaction context, the container Invokes the Enterprise Bean ' s method in the client's transaction context.
Transactionattributetype. never
The client is required-to-call without a transaction context, otherwise an exception is thrown.
Transactionattributetype. not_supported
The container invokes an enterprise beans method whose transaction attribute not_supported with an unspecified transaction Context.
Transactionattributetype. REQUIRED
If a client invokes the enterprise bean ' s method while the client was associated with a transaction context, the container Invokes the Enterprise Bean ' s method in the client's transaction context.
Transactionattributetype. requires_new
The container must invoke an enterprise bean method whose transaction attribute are set to requires_new with a NEW transact Ion context.
Transactionattributetype. SUPPORTS
If the client calls with a transaction context, the container performs the same steps as described in the REQUIRED case.
Java EE (9)--JDBC & JTA