Sobes.tech
Junior — Middle

Is it possible to process three transactions simultaneously within one session?

sobes.tech AI

Answer from AI

In Java, within a single session (for example, in the context of JDBC or JTA), concurrent processing of multiple transactions is usually not possible, as the session is associated with one active transactional context.

If parallel processing of multiple transactions is required, typically multiple sessions or connections are created, each managing its own transaction.

For example, in JDBC:

  • Each connection (Connection) can have one active transaction.
  • To work with transactions in parallel, multiple connections are created.

Within a single session, multiple transactions can be executed sequentially, but not simultaneously.

Therefore, concurrent processing of three transactions in one session is impossible; multiple sessions or connections are needed.

Is it possible to process three transactions… - sobes.tech