Class ManagedJdbcTransactionContext

java.lang.Object
org.j7m.middleware.application.distributed.ManagedJdbcTransactionContext

public final class ManagedJdbcTransactionContext extends Object
Invocation-bound local H2 JDBC unit of work. The host owns its one physical connection. Application SQL and JdbcDelivery share one stable guarded Connection. The guard supports only the declared finite H2 data subset, not transaction control, DDL, procedures, vendor unwrapping, savepoints or arbitrary SQL sandboxing. USER work is serial; results must be detached data before settlement. JDBC/LOB/stream handles cannot be used by a codec or after USER seal.
  • Method Details

    • connection

      public Connection connection() throws SQLException
      Returns the same guarded connection for every access in this actual transaction. Application code may close its statements/results, but cannot commit, roll back, configure or close this connection. Inbox/outbox calls use this exact object together with application SQL.
      Returns:
      borrowed stable guarded connection
      Throws:
      SQLException - outside the owning open USER scope or before successful admission
    • setRollbackOnly

      public void setRollbackOnly() throws SQLException
      Marks the entire REQUIRED unit of work rollback-only; no nested caller can clear the flag.
      Throws:
      SQLException - outside the owning open USER phase
    • rollbackOnly

      public boolean rollbackOnly()
      Returns whether the transaction must roll back rather than commit.
      Returns:
      sticky rollback-only state