Java EE (9)--JDBC & JTA

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.