Java Code Examples for javax.transaction.InvalidTransactionException

The following are top voted examples for showing how to use javax.transaction.InvalidTransactionException. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: incubator-servicecomb-saga   File: TransactionAspectTest.java   Source Code and License 6 votes vote down vote up
@Test
public void returnImmediatelyWhenReceivedRejectResponse() throws Throwable {
  MessageSender sender = mock(MessageSender.class);
  when(sender.send(any())).thenReturn(new AlphaResponse(true));

  TransactionAspect aspect = new TransactionAspect(sender, omegaContext);
  try {
    aspect.advise(joinPoint, compensable);
    expectFailing(InvalidTransactionException.class);
  } catch (InvalidTransactionException e) {
    System.out.println(e.getMessage());
    assertThat(e.getMessage().contains("Abort sub transaction"), is(true));
  }

  verify(sender, times(1)).send(any());
}
 
Example 2
Project: javaee-samples   File: BeanManager.java   Source Code and License 6 votes vote down vote up
private static boolean canContinueWithTransaction(Transactional config, EntityTransaction transaction, Method m) {
    switch (config.value()) {
        case REQUIRED:
            return true;
        case MANDATORY:
            if (!transaction.isActive()) {
                throwTransactionalException(config.value(), m,
                        new TransactionRequiredException("called outside a transaction context"));
            }
            return false;
        case NEVER:
            if (transaction.isActive()) {
                throwTransactionalException(config.value(), m,
                        new InvalidTransactionException("called inside a transaction context"));
            }
            return false;
        case SUPPORTS:
            return false;
        case REQUIRES_NEW: // not fully supported
            return true;
        case NOT_SUPPORTED: // not fully supported
            return false;
        default:
            throw new UnsupportedOperationException("Unknown enum " + config.value());
    }
}
 
Example 3
Project: tomee   File: PseudoTransactionService.java   Source Code and License 6 votes vote down vote up
public void resume(final Transaction tx) throws InvalidTransactionException {
    if (tx == null) {
        throw new InvalidTransactionException("Transaction is null");
    }
    if (!(tx instanceof MyTransaction)) {
        throw new InvalidTransactionException("Unknown transaction type " + tx.getClass().getName());
    }
    final MyTransaction myTransaction = (MyTransaction) tx;

    if (threadTransaction.get() != null) {
        throw new IllegalStateException("A transaction is already active");
    }

    final int status = myTransaction.getStatus();
    if (status != Status.STATUS_ACTIVE && status != Status.STATUS_MARKED_ROLLBACK) {
        throw new InvalidTransactionException("Expected transaction to be STATUS_ACTIVE or STATUS_MARKED_ROLLBACK, but was " + status);
    }

    threadTransaction.set(myTransaction);
}
 
Example 4
Project: btm   File: BitronixTransactionManager.java   Source Code and License 6 votes vote down vote up
@Override
public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
    if (log.isDebugEnabled()) { log.debug("resuming " + transaction); }
    if (transaction == null)
        throw new InvalidTransactionException("resumed transaction cannot be null");
    if (!(transaction instanceof BitronixTransaction))
        throw new InvalidTransactionException("resumed transaction must be an instance of BitronixTransaction");

    BitronixTransaction tx = (BitronixTransaction) transaction;
    if (getCurrentTransaction() != null)
        throw new IllegalStateException("a transaction is already running on this thread");

    try {
        XAResourceManager resourceManager = tx.getResourceManager();
        resourceManager.resume();
        ThreadContext threadContext = ThreadContext.getThreadContext();
        threadContext.setTransaction(tx);
        inFlightTransactions.get(tx).setThreadContext(threadContext);
        MDC.put(MDC_GTRID_KEY, tx.getGtrid());
    } catch (XAException ex) {
        String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(ex);
        throw new BitronixSystemException("cannot resume " + tx + ", error=" + Decoder.decodeXAExceptionErrorCode(ex) +
                (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
    }
}
 
Example 5
Project: incubator-servicecomb-saga   File: TransactionAspect.java   Source Code and License 5 votes vote down vote up
@Around("execution(@org.apache.servicecomb.saga.omega.transaction.annotations.Compensable * *(..)) && @annotation(compensable)")
Object advise(ProceedingJoinPoint joinPoint, Compensable compensable) throws Throwable {
  Method method = ((MethodSignature) joinPoint.getSignature()).getMethod();
  LOG.debug("Intercepting compensable method {} with context {}", method.toString(), context);

  String signature = compensationMethodSignature(joinPoint, compensable, method);

  String localTxId = context.localTxId();
  context.newLocalTxId();

  TimeAwareInterceptor interceptor = new TimeAwareInterceptor(this.interceptor);
  AlphaResponse response = interceptor.preIntercept(localTxId, signature, joinPoint.getArgs());
  if (response.aborted()) {
    String abortedLocalTxId = context.localTxId();
    context.setLocalTxId(localTxId);
    throw new InvalidTransactionException("Abort sub transaction " + abortedLocalTxId +
        " because global transaction " + context.globalTxId() + " has already aborted.");
  }
  LOG.debug("Updated context {} for compensable method {} ", context, method.toString());

  scheduleTimeoutTask(interceptor, localTxId, signature, method, compensable.timeout());

  try {
    Object result = joinPoint.proceed();
    interceptor.postIntercept(localTxId, signature);

    return result;
  } catch (Throwable throwable) {
    interceptor.onError(localTxId, signature, throwable);
    throw throwable;
  } finally {
    context.setLocalTxId(localTxId);
    LOG.debug("Restored context back to {}", context);
  }
}
 
Example 6
Project: alfresco-repository   File: SimpleTransactionManager.java   Source Code and License 5 votes vote down vote up
public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException
{
    if (!(tx instanceof SimpleTransaction))
    {
        throw new IllegalStateException("Transaction must be a SimpleTransaction to resume");
    }
    SimpleTransaction.resume((SimpleTransaction) tx);
}
 
Example 7
Project: lams   File: JtaTransactionManager.java   Source Code and License 5 votes vote down vote up
/**
 * Perform a JTA resume on the JTA TransactionManager.
 * <p>Can be overridden in subclasses, for specific JTA implementations.
 * @param txObject the JtaTransactionObject containing the UserTransaction
 * @param suspendedTransaction the suspended JTA Transaction object
 * @throws InvalidTransactionException if thrown by JTA methods
 * @throws SystemException if thrown by JTA methods
 * @see #getTransactionManager()
 * @see javax.transaction.TransactionManager#resume(javax.transaction.Transaction)
 */
protected void doJtaResume(JtaTransactionObject txObject, Object suspendedTransaction)
	throws InvalidTransactionException, SystemException {

	if (getTransactionManager() == null) {
		throw new TransactionSuspensionNotSupportedException(
				"JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: " +
				"specify the 'transactionManager' or 'transactionManagerName' property");
	}
	getTransactionManager().resume((Transaction) suspendedTransaction);
}
 
Example 8
Project: openjdk-jdk10   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * Create InvalidTransactionException with no-arg constructor
 */
@Test
public void test1() {
    InvalidTransactionException ex = new InvalidTransactionException();
    assertTrue(ex.getMessage() == null
            && ex.getCause() == null);
}
 
Example 9
Project: openjdk-jdk10   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * Create InvalidTransactionException with message
 */
@Test
public void test2() {
    InvalidTransactionException ex = new InvalidTransactionException(reason);
    assertTrue(ex.getMessage().equals(reason)
            && ex.getCause() == null);
}
 
Example 10
Project: openjdk-jdk10   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * De-Serialize a InvalidTransactionException from JDBC 4.0 and make sure
 * you can read it back properly
 */
@Test
public void test3() throws Exception {

    ObjectInputStream ois = new ObjectInputStream(
            new ByteArrayInputStream(SerializedTransactionExceptions.ITE_DATA));
    InvalidTransactionException ex = (InvalidTransactionException) ois.readObject();
    assertTrue(reason.equals(ex.getMessage())
            && ex.getCause() == null);
}
 
Example 11
Project: openjdk9   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * Create InvalidTransactionException with no-arg constructor
 */
@Test
public void test1() {
    InvalidTransactionException ex = new InvalidTransactionException();
    assertTrue(ex.getMessage() == null
            && ex.getCause() == null);
}
 
Example 12
Project: openjdk9   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * Create InvalidTransactionException with message
 */
@Test
public void test2() {
    InvalidTransactionException ex = new InvalidTransactionException(reason);
    assertTrue(ex.getMessage().equals(reason)
            && ex.getCause() == null);
}
 
Example 13
Project: openjdk9   File: InvalidTransactionExceptionTests.java   Source Code and License 5 votes vote down vote up
/**
 * De-Serialize a InvalidTransactionException from JDBC 4.0 and make sure
 * you can read it back properly
 */
@Test
public void test3() throws Exception {

    ObjectInputStream ois = new ObjectInputStream(
            new ByteArrayInputStream(SerializedTransactionExceptions.ITE_DATA));
    InvalidTransactionException ex = (InvalidTransactionException) ois.readObject();
    assertTrue(reason.equals(ex.getMessage())
            && ex.getCause() == null);
}
 
Example 14
Project: scipio-erp   File: DumbTransactionFactory.java   Source Code and License 5 votes vote down vote up
public TransactionManager getTransactionManager() {
    return new TransactionManager() {
        public void begin() throws NotSupportedException, SystemException {
        }

        public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        }

        public int getStatus() throws SystemException {
            return TransactionUtil.STATUS_NO_TRANSACTION;
        }

        public Transaction getTransaction() throws SystemException {
            return null;
        }

        public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
        }

        public void rollback() throws IllegalStateException, SecurityException, SystemException {
        }

        public void setRollbackOnly() throws IllegalStateException, SystemException {
        }

        public void setTransactionTimeout(int i) throws SystemException {
        }

        public Transaction suspend() throws SystemException {
            return null;
        }
    };
}
 
Example 15
Project: spring4-understanding   File: JtaTransactionManager.java   Source Code and License 5 votes vote down vote up
/**
 * Perform a JTA resume on the JTA TransactionManager.
 * <p>Can be overridden in subclasses, for specific JTA implementations.
 * @param txObject the JtaTransactionObject containing the UserTransaction
 * @param suspendedTransaction the suspended JTA Transaction object
 * @throws InvalidTransactionException if thrown by JTA methods
 * @throws SystemException if thrown by JTA methods
 * @see #getTransactionManager()
 * @see javax.transaction.TransactionManager#resume(javax.transaction.Transaction)
 */
protected void doJtaResume(JtaTransactionObject txObject, Object suspendedTransaction)
	throws InvalidTransactionException, SystemException {

	if (getTransactionManager() == null) {
		throw new TransactionSuspensionNotSupportedException(
				"JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: " +
				"specify the 'transactionManager' or 'transactionManagerName' property");
	}
	getTransactionManager().resume((Transaction) suspendedTransaction);
}
 
Example 16
Project: lasta-di   File: AbstractTransactionManager.java   Source Code and License 5 votes vote down vote up
public void resume(final Transaction resumeTx) throws InvalidTransactionException, IllegalStateException, SystemException {
    final ExtendedTransaction tx = getCurrent();
    if (tx != null) {
        throw new LjtIllegalStateException("Already assigned the other transaction for resume().");
    }
    ((ExtendedTransaction) resumeTx).resume();
    setCurrent((ExtendedTransaction) resumeTx);
}
 
Example 17
Project: rise   File: TransactionControl.java   Source Code and License 5 votes vote down vote up
private <T> T suspendTransactionAndExecute(Supplier<T> supplier) {
    Transaction old;
    try {
        old = txm.suspend();
        try {
            return supplier.get();
        } finally {
            txm.resume(old);
        }
    } catch (InvalidTransactionException | IllegalStateException | SystemException e) {
        throw new TransactionException("Error while suspending and resuming transaction", e);
    }
}
 
Example 18
Project: one-datasource   File: TransactionManagerImpl.java   Source Code and License 5 votes vote down vote up
@Override
public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException {
    if (getTransaction() != null) {
        throw new IllegalStateException("Transaction is already associated");
    }
    if (!(tx instanceof TransactionImpl)) {
        throw new InvalidTransactionException("Foreign transaction: " + tx);
    }
    TRANSACTIONS.set((TransactionImpl) tx);
}
 
Example 19
Project: openjtcc   File: TransactionManagerImpl.java   Source Code and License 5 votes vote down vote up
public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
	if (TransactionImpl.class.isInstance(tx)) {
		TransactionImpl transaction = (TransactionImpl) tx;
		transaction.resumeAllResource();
		AssociatedContext bctx = new AssociatedContext();
		bctx.setThread(Thread.currentThread());
		this.threadToTxnMap.put(Thread.currentThread(), bctx);
	} else {
		throw new InvalidTransactionException();
	}
}
 
Example 20
Project: javaee-samples   File: JPARule.java   Source Code and License 5 votes vote down vote up
public <T> T $$(Function<EntityManager, T> block) {
    if (beanManager.isEntityManagerExistsOpen()) {
        beanManager.getCurrentEntityManager().close();
    }
    final EntityManager em = beanManager.getCurrentEntityManager();
    final EntityTransaction transaction = em.getTransaction();
    if (transaction.isActive()) {
        throw new TransactionalException("Transactional block must not be called within current transaction.",
                new InvalidTransactionException("transaction in " + Thread.currentThread()));
    }

    Optional<Throwable> t = empty();

    try {
        transaction.begin();
        return block.apply(em);
    } catch (Throwable e) {
        t = of(e);
        e.printStackTrace();
    } finally {
        try {
            if (t.isPresent()) {
                t = performAndAddSuppressedException(transaction::rollback, t);
            } else {
                t = perform(transaction::commit);
                t.ifPresent(Throwable::printStackTrace);
            }
        } finally {
            boolean noExceptionBefore = !t.isPresent();
            t = performAndAddSuppressedException(em::close, t);
            t.filter(x -> noExceptionBefore).ifPresent(Throwable::printStackTrace);
        }

        t.ifPresent(x -> { throw new TransactionalException(x.getLocalizedMessage(), x); });
    }

    throw new AssertionError("unreachable statement");
}
 
Example 21
Project: elpi   File: DumbFactory.java   Source Code and License 5 votes vote down vote up
public TransactionManager getTransactionManager() {
    return new TransactionManager() {
        public void begin() throws NotSupportedException, SystemException {
        }

        public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        }

        public int getStatus() throws SystemException {
            return TransactionUtil.STATUS_NO_TRANSACTION;
        }

        public Transaction getTransaction() throws SystemException {
            return null;
        }

        public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
        }

        public void rollback() throws IllegalStateException, SecurityException, SystemException {
        }

        public void setRollbackOnly() throws IllegalStateException, SystemException {
        }

        public void setTransactionTimeout(int i) throws SystemException {
        }

        public Transaction suspend() throws SystemException {
            return null;
        }
    };
}
 
Example 22
Project: community-edition-old   File: SimpleTransactionManager.java   Source Code and License 5 votes vote down vote up
public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException
{
    if (!(tx instanceof SimpleTransaction))
    {
        throw new IllegalStateException("Transaction must be a SimpleTransaction to resume");
    }
    SimpleTransaction.resume((SimpleTransaction) tx);
}
 
Example 23
Project: o3erp   File: DumbFactory.java   Source Code and License 5 votes vote down vote up
public TransactionManager getTransactionManager() {
    return new TransactionManager() {
        public void begin() throws NotSupportedException, SystemException {
        }

        public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        }

        public int getStatus() throws SystemException {
            return TransactionUtil.STATUS_NO_TRANSACTION;
        }

        public Transaction getTransaction() throws SystemException {
            return null;
        }

        public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
        }

        public void rollback() throws IllegalStateException, SecurityException, SystemException {
        }

        public void setRollbackOnly() throws IllegalStateException, SystemException {
        }

        public void setTransactionTimeout(int i) throws SystemException {
        }

        public Transaction suspend() throws SystemException {
            return null;
        }
    };
}
 
Example 24
Project: class-guard   File: JtaTransactionManager.java   Source Code and License 5 votes vote down vote up
/**
 * Perform a JTA resume on the JTA TransactionManager.
 * <p>Can be overridden in subclasses, for specific JTA implementations.
 * @param txObject the JtaTransactionObject containing the UserTransaction
 * @param suspendedTransaction the suspended JTA Transaction object
 * @throws InvalidTransactionException if thrown by JTA methods
 * @throws SystemException if thrown by JTA methods
 * @see #getTransactionManager()
 * @see javax.transaction.TransactionManager#resume(javax.transaction.Transaction)
 */
protected void doJtaResume(JtaTransactionObject txObject, Object suspendedTransaction)
	throws InvalidTransactionException, SystemException {

	if (getTransactionManager() == null) {
		throw new TransactionSuspensionNotSupportedException(
				"JtaTransactionManager needs a JTA TransactionManager for suspending a transaction: " +
				"specify the 'transactionManager' or 'transactionManagerName' property");
	}
	getTransactionManager().resume((Transaction) suspendedTransaction);
}
 
Example 25
Project: clearpool   File: TransactionManagerImpl.java   Source Code and License 5 votes vote down vote up
@Override
public void resume(Transaction transaction) throws InvalidTransactionException, SystemException {
  if (!(transaction instanceof TransactionAdapter) || this.suspendTx == null
      || !this.suspendTx.remove(transaction)) {
    throw new InvalidTransactionException("the transaction is invalid");
  }
  Transaction tx = ((TransactionAdapter) transaction).getTx();
  Transaction current = TX_HOLDER.get();
  if (current != null) {
    throw new IllegalStateException("the thread already has a transaction");
  }
  ((TransactionImpl) tx).resume();
  TX_HOLDER.set(tx);
}
 
Example 26
Project: jbromo   File: AtomikosManagedRuntime.java   Source Code and License 5 votes vote down vote up
@Override
public void doNonTransactionalWork(final Runnable runnable) throws NotSupportedException {
    try {
        final Transaction transaction = getTransactionManager().suspend();
        try {
            runnable.run();
        } finally {
            getTransactionManager().resume(transaction);
        }
    } catch (final InvalidTransactionException | SystemException e) {
        log.error("Cannot suspend transaction", e);
        throw new NotSupportedException(e.getMessage());
    }

}
 
Example 27
Project: ironjacamar   File: TransactionManagerImpl.java   Source Code and License 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void resume(Transaction tobj) throws InvalidTransactionException,
                                            IllegalStateException,
                                            SystemException
{
   if (!(tobj instanceof TransactionImpl))
      throw new SystemException();

   registry.assignTransaction((TransactionImpl)tobj);
}
 
Example 28
Project: transaction-cdi   File: AbstractTransactionSupport.java   Source Code and License 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void resume(
    Transaction transaction)
throws InvalidTransactionException, IllegalStateException, SystemException
{
    transactionManager.resume(transaction);
}
 
Example 29
Project: tomee   File: NeverInterceptor.java   Source Code and License 5 votes vote down vote up
@AroundInvoke
public Object intercept(final InvocationContext ic) throws Exception {
    try {
        return super.intercept(ic);
    } catch (final RemoteException re) {
        throw new TransactionalException(re.getMessage(), new InvalidTransactionException(re.getMessage()));
    }
}
 
Example 30
Project: btm   File: NewJdbcSuspendResumeMockTest.java   Source Code and License 5 votes vote down vote up
public void testSimpleAssertions() throws Exception {
    if (log.isDebugEnabled()) { log.debug("*** getting TM"); }
    BitronixTransactionManager tm = TransactionManagerServices.getTransactionManager();

    assertNull(tm.suspend());

    try {
        tm.resume(null);
        fail("expected InvalidTransactionException");
    } catch (InvalidTransactionException ex) {
        assertEquals("resumed transaction cannot be null", ex.getMessage());
    }

    if (log.isDebugEnabled()) { log.debug("*** before begin"); }
    tm.begin();
    if (log.isDebugEnabled()) { log.debug("*** after begin"); }

    if (log.isDebugEnabled()) { log.debug("*** getting connection from DS1"); }
    Connection connection1 = poolingDataSource1.getConnection();
    connection1.createStatement();

    if (log.isDebugEnabled()) { log.debug("*** closing connection 1"); }
    connection1.close();

    if (log.isDebugEnabled()) { log.debug("*** committing"); }
    tm.commit();
    if (log.isDebugEnabled()) { log.debug("*** TX is done"); }
}
 
Example 31
Project: pooled-jms   File: XAConnectionPoolTest.java   Source Code and License 4 votes vote down vote up
@Test(timeout = 60000)
public void testSessionArgsIgnoredWithTm() throws Exception {
    JmsPoolXAConnectionFactory pcf = new JmsPoolXAConnectionFactory();
    pcf.setConnectionFactory(new ActiveMQXAConnectionFactory(
        "vm://test?broker.persistent=false&broker.useJmx=false"));

    // simple TM that with no tx
    pcf.setTransactionManager(new TransactionManager() {
        @Override
        public void begin() throws NotSupportedException, SystemException {
            throw new SystemException("NoTx");
        }

        @Override
        public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException {
            throw new IllegalStateException("NoTx");
        }

        @Override
        public int getStatus() throws SystemException {
            return Status.STATUS_NO_TRANSACTION;
        }

        @Override
        public Transaction getTransaction() throws SystemException {
            throw new SystemException("NoTx");
        }

        @Override
        public void resume(Transaction tobj) throws IllegalStateException, InvalidTransactionException, SystemException {
            throw new IllegalStateException("NoTx");
        }

        @Override
        public void rollback() throws IllegalStateException, SecurityException, SystemException {
            throw new IllegalStateException("NoTx");
        }

        @Override
        public void setRollbackOnly() throws IllegalStateException, SystemException {
            throw new IllegalStateException("NoTx");
        }

        @Override
        public void setTransactionTimeout(int seconds) throws SystemException {
        }

        @Override
        public Transaction suspend() throws SystemException {
            throw new SystemException("NoTx");
        }
    });

    QueueConnection connection = pcf.createQueueConnection();
    // like ee tck
    assertNotNull("can create session(false, 0)", connection.createQueueSession(false, 0));

    connection.close();
    pcf.stop();
}
 
Example 32
Project: testee.fi   File: PropertyContributor.java   Source Code and License 4 votes vote down vote up
private TransactionManager transactionManager() {
    return new TransactionManager() {
        private int status = Status.STATUS_NO_TRANSACTION;

        @Override
        public void begin() throws NotSupportedException, SystemException {
            status = Status.STATUS_ACTIVE;
        }

        @Override
        public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
            status = Status.STATUS_NO_TRANSACTION;
        }

        @Override
        public void rollback() throws IllegalStateException, SecurityException, SystemException {
            status = Status.STATUS_NO_TRANSACTION;
        }

        @Override
        public void setRollbackOnly() throws IllegalStateException, SystemException {
            // Nothing to do
        }

        @Override
        public int getStatus() throws SystemException {
            return status;
        }

        @Override
        public Transaction getTransaction() throws SystemException {
            return transaction();
        }

        @Override
        public void setTransactionTimeout(int seconds) throws SystemException {
            throw new AssertionError("setTransactionTimeout");
        }

        @Override
        public Transaction suspend() throws SystemException {
            return transaction();
        }

        @Override
        public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException {
            // nothing to do
        }
    };
}
 
Example 33
Project: hibernate-ogm-ignite   File: DelegatingTransactionManager.java   Source Code and License 4 votes vote down vote up
@Override
public void resume( final Transaction tobj ) throws InvalidTransactionException, IllegalStateException, SystemException {
	delegate.resume( tobj );
}
 
Example 34
Project: mdw   File: MdwTransactionManager.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws IllegalStateException,
        InvalidTransactionException, SystemException {
    // not used
}
 
Example 35
Project: DuctileDB   File: TransactionManagerImpl.java   Source Code and License 4 votes vote down vote up
@Override
   public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException {
// TODO Auto-generated method stub

   }
 
Example 36
Project: cacheonix-core   File: DummyTransactionManager.java   Source Code and License 4 votes vote down vote up
public void resume(Transaction tx) throws InvalidTransactionException,
		IllegalStateException, SystemException {
	current = (DummyTransaction) tx;
}
 
Example 37
Project: lasta-di   File: RestrictedTransactionManager.java   Source Code and License 4 votes vote down vote up
public void resume(Transaction tx) throws IllegalStateException, InvalidTransactionException, SystemException {
    throw new UnsupportedOperationException("resume");
}
 
Example 38
Project: ignite   File: WebSphereTmFactory.java   Source Code and License 4 votes vote down vote up
/** {@inheritDoc} */
@Override public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException,
    SystemException {
    mgr.resume(tobj);
}
 
Example 39
Project: ignite   File: CacheJndiTmFactorySelfTest.java   Source Code and License 4 votes vote down vote up
/** {@inheritDoc} */
@Override public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException,
    SystemException {
}
 
Example 40
Project: activemq-artemis   File: DummyTransactionManager.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
}
 
Example 41
Project: switchyard   File: TransactionHandlerTest.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws InvalidTransactionException,
        IllegalStateException, SystemException {
    transaction.set(MockTransaction.class.cast(arg0));
}
 
Example 42
Project: rhq-server-plugins   File: MockTransactionManager.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws InvalidTransactionException, IllegalStateException, SystemException {
}
 
Example 43
Project: rhq-server-plugins   File: MockTransactionManager.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws InvalidTransactionException,
        IllegalStateException, SystemException {
}
 
Example 44
Project: clearpool   File: UserTransactionImpl.java   Source Code and License 4 votes vote down vote up
public void resume(Transaction tobj) throws InvalidTransactionException, SystemException {
  TransactionManagerImpl.getManager().resume(tobj);
}
 
Example 45
Project: ironjacamar   File: TransactionManagerDelegator.java   Source Code and License 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException
{
   tm.resume(tobj);
}
 
Example 46
Project: bundles   File: BitronixImpl.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws IllegalStateException, InvalidTransactionException, SystemException {
	delegate.resume(arg0);
}
 
Example 47
Project: bundles   File: JotmImpl.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(Transaction arg0) throws IllegalStateException, InvalidTransactionException, SystemException {
	delegate.resume(arg0);
}
 
Example 48
Project: jBPM-WAS7-Spring-Sample   File: WebSphereUOWTransactionLookup.java   Source Code and License 4 votes vote down vote up
public void resume(Transaction txn) throws InvalidTransactionException,
      IllegalStateException, SystemException {
   throw new UnsupportedOperationException();
}
 
Example 49
Project: tomee   File: GeronimoConnectionManagerFactory.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(final Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException {
    delegate.resume(transaction);
}
 
Example 50
Project: tomee   File: TransactionManagerWrapper.java   Source Code and License 4 votes vote down vote up
@Override
public void resume(final Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException {
    delegate.resume(((TransactionWrapper) transaction).transaction);
}
 
Example 51
Project: activemq-artemis   File: DummyTransactionManagerLocator.java   Source Code and License 2 votes vote down vote up
@Override
public void resume(Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException {

}
 
Example 52
Project: activemq-artemis   File: DummyTransactionManagerLocator.java   Source Code and License 2 votes vote down vote up
@Override
public void resume(Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException {

}
 
Example 53
Project: SORCER   File: FileStorer.java   Source Code and License 2 votes vote down vote up
/**
 * Returns a document descriptor intialized for file read operations.
 * 
 * @param desc
 *            an initial document descriptor
 * @return a document descriptor initialized for read operations
 * @throws RemoteException
 * @throws IOException
 * @throws InvalidTransactionException
 */
public DocumentDescriptor getInputDescriptor(DocumentDescriptor desc)
		throws RemoteException, IOException, InvalidTransactionException;
 
Example 54
Project: SORCER   File: FileStorer.java   Source Code and License 2 votes vote down vote up
/**
 * Returns a document descriptor intialized for file appending operations.
 * 
 * @param desc
 *            an initial document descriptor
 * @return a document descriptor initialized for append operations
 * @throws RemoteException
 * @throws IOException
 * @throws InvalidTransactionException
 */
public DocumentDescriptor getAppendDescriptor(DocumentDescriptor desc)
		throws RemoteException, IOException, InvalidTransactionException;
 
Example 55
Project: SORCER   File: FileStorer.java   Source Code and License 2 votes vote down vote up
/**
 * Returns a document descriptor intialized for file writing operations.
 * 
 * @param desc
 *            an initial document descriptor
 * @return a document descriptor initialized for write operation
 * @throws RemoteException
 * @throws IOException
 * @throws InvalidTransactionException
 */
public DocumentDescriptor getOutputDescriptor(DocumentDescriptor desc)
		throws RemoteException, IOException, InvalidTransactionException;
 
Example 56
Project: transaction-cdi   File: TransactionSupport.java   Source Code and License 2 votes vote down vote up
/**
 * Resume the transaction context association of the calling thread with the
 * transaction represented by the supplied Transaction object. When this
 * method returns, the calling thread is associated with the transaction
 * context specified.
 *
 * @param transaction the {@link Transaction} object that represents the
 *        transaction to be resumed.
 * @throws InvalidTransactionException thrown if the parameter transaction
 *         object contains an invalid transaction.
 * @throws IllegalStateException thrown if the thread is already associated
 *         with another transaction.
 * @throws SystemException thrown if the transaction manager encounters an
 *         unexpected error condition.
 */
public void resume(
    Transaction transaction)
throws InvalidTransactionException, IllegalStateException,
    SystemException;