Class SimpleTransaction

  • All Implemented Interfaces:
    ITransaction, java.lang.AutoCloseable

    public final class SimpleTransaction
    extends java.lang.Object
    implements ITransaction
    Simple implementation of a transaction service, taking cues from JEE but without the overhead. No distributed transaction support.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Override the AutoCloseable.close() method so that we can refine the exception
      void setRollbackOnly()
      Mark the transaction as failed, so that we we end it, we'll rollback
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleTransaction

        protected SimpleTransaction​(IConnectionProvider cp)
        Protected constructor. Should only be instantiated by the TransactionFactory
        Parameters:
        cp -
    • Method Detail

      • setRollbackOnly

        public void setRollbackOnly()
        Description copied from interface: ITransaction
        Mark the transaction as failed, so that we we end it, we'll rollback
        Specified by:
        setRollbackOnly in interface ITransaction