Examples of IllegalTransactionStateException


Examples of org.mule.transaction.IllegalTransactionStateException

        }

        Transaction transaction = TransactionCoordination.getInstance().getTransaction();
        if (transaction == null)
        {
            throw new IllegalTransactionStateException(CoreMessages.noMuleTransactionAvailable());
        }
        if (!(transaction instanceof XaTransaction))
        {
            throw new IllegalTransactionStateException(CoreMessages.notMuleXaTransaction(transaction));
        }

        if (!isEnlisted())
        {
            if (logger.isDebugEnabled())
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

        }

        Transaction transaction = TransactionCoordination.getInstance().getTransaction();
        if (transaction == null)
        {
            throw new IllegalTransactionStateException(CoreMessages.noMuleTransactionAvailable());
        }
        if (!(transaction instanceof XaTransaction))
        {
            throw new IllegalTransactionStateException(CoreMessages.notMuleXaTransaction(transaction));
        }

        if (isEnlisted())
        {
            if (logger.isDebugEnabled())
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

    public void bindResource(Object key, Object resource) throws TransactionException
    {
        if (!(key instanceof Connection) || !(resource instanceof Session))
        {
            throw new IllegalTransactionStateException(
                CoreMessages.transactionCanOnlyBindToResources("javax.jms.Connection/javax.jms.Session"));
        }

        Session session = (Session)resource;
        try
        {
            if (!session.getTransacted())
            {
                throw new IllegalTransactionStateException(JmsMessages.sessionShouldBeTransacted());
            }
        }
        catch (JMSException e)
        {
            throw new IllegalTransactionStateException(CoreMessages.transactionCannotReadState(), e);
        }

        super.bindResource(key, resource);
    }
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

    public void bindResource(Object key, Object resource) throws TransactionException
    {
        if (!(key instanceof QueueManager) || !(resource instanceof QueueSession))
        {
            throw new IllegalTransactionStateException(
                CoreMessages.transactionCanOnlyBindToResources("QueueManager/QueueSession"));
        }
        super.bindResource(key, resource);
    }
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

    public void bindResource(Object key, Object resource) throws TransactionException
    {
        if (!(key instanceof DataSource) || !(resource instanceof Connection))
        {
            throw new IllegalTransactionStateException(
                CoreMessages.transactionCanOnlyBindToResources("javax.sql.DataSource/java.sql.Connection"));
        }
        Connection con = (Connection)resource;
        try
        {
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

        }

        Transaction transaction = TransactionCoordination.getInstance().getTransaction();
        if (transaction == null)
        {
            throw new IllegalTransactionStateException(CoreMessages.noMuleTransactionAvailable());
        }
        if (!(transaction instanceof XaTransaction))
        {
            throw new IllegalTransactionStateException(CoreMessages.notMuleXaTransaction(transaction));
        }

        synchronized (enlistedXAResourceLock)
        {
            if (!isEnlisted())
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

        }

        Transaction transaction = TransactionCoordination.getInstance().getTransaction();
        if (transaction == null)
        {
            throw new IllegalTransactionStateException(CoreMessages.noMuleTransactionAvailable());
        }
        if (!(transaction instanceof XaTransaction))
        {
            throw new IllegalTransactionStateException(CoreMessages.notMuleXaTransaction(transaction));
        }

        synchronized (enlistedXAResourceLock)
        {
            if (isEnlisted())
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

    {
        try
        {
            if (message == null)
            {
                throw new IllegalTransactionStateException(
                    JmsMessages.noMessageBoundForAck());
            }
            message.acknowledge();
        }
        catch (JMSException e)
        {
            throw new IllegalTransactionStateException(CoreMessages.transactionCommitFailed(), e);
        }
    }
View Full Code Here

Examples of org.mule.transaction.IllegalTransactionStateException

            this.message = (Message)key;
            return;
        }
        if (!(key instanceof Connection) || !(resource instanceof Session))
        {
            throw new IllegalTransactionStateException(
                CoreMessages.transactionCanOnlyBindToResources("javax.jms.Connection/javax.jms.Session"));
        }

        Session session = (Session)resource;
        try
        {
            if (session.getTransacted())
            {
                throw new IllegalTransactionStateException(JmsMessages.sessionShouldNotBeTransacted());
            }
        }
        catch (JMSException e)
        {
            throw new IllegalTransactionStateException(CoreMessages.transactionCannotReadState(), e);
        }

        super.bindResource(key, resource);
    }
View Full Code Here

Examples of org.springframework.transaction.IllegalTransactionStateException

    return (txObject.getPersistenceBrokerHolder() != null);
  }

  protected void doBegin(Object transaction, TransactionDefinition definition) {
    if (getDataSource() != null && TransactionSynchronizationManager.hasResource(getDataSource())) {
      throw new IllegalTransactionStateException(
          "Pre-bound JDBC Connection found - PersistenceBrokerTransactionManager does not support " +
          "running within DataSourceTransactionManager if told to manage the DataSource itself. " +
          "It is recommended to use a single PersistenceBrokerTransactionManager for all transactions " +
          "on a single DataSource, no matter whether PersistenceBroker or JDBC access.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.