Package org.mule.api.transaction

Examples of org.mule.api.transaction.TransactionException


            xat.begin();
            return xat;
        }
        catch (Exception e)
        {
            throw new TransactionException(CoreMessages.cannotStartTransaction("XA"), e);
        }
    }
View Full Code Here


            xat.begin();
            return xat;
        }
        catch (Exception e)
        {
            throw new TransactionException(CoreMessages.cannotStartTransaction("XA"), e);
        }
    }
View Full Code Here

                transaction = txManager.getTransaction();
            }
        }
        catch (Exception e)
        {
            throw new TransactionException(CoreMessages.cannotStartTransaction("XA"), e);
        }
    }
View Full Code Here

        try
        {
            Transaction jtaTransaction = txManager.getTransaction();
            if (jtaTransaction == null)
            {
                throw new TransactionException(MessageFactory.createStaticMessage("XATransaction is null"));
            }
            return jtaTransaction.enlistResource(resource);
        }
        catch (RollbackException e)
        {
            throw new TransactionException(e);
        }
        catch (SystemException e)
        {
            throw new TransactionException(e);
        }
    }
View Full Code Here

        try
        {
            Transaction jtaTransaction = txManager.getTransaction();
            if (jtaTransaction == null)
            {
                throw new TransactionException(CoreMessages.noJtaTransactionAvailable(Thread.currentThread()));
            }
            return jtaTransaction.delistResource(resource, tmflag);
        }
        catch (SystemException e)
        {
            throw new TransactionException(e);
        }
    }
View Full Code Here

        {
            txManager.resume(transaction);
        }
        catch (InvalidTransactionException e)
        {
            throw new TransactionException(e);
        }
        catch (SystemException e)
        {
            throw new TransactionException(e);
        }
    }
View Full Code Here

        {
            transaction = txManager.suspend();
        }
        catch (SystemException e)
        {
            throw new TransactionException(e);
        }
        return transaction;
    }
View Full Code Here

                                                     + "." + StringUtils.capitalize(protocol)
                                                     + "TransactionFactory";

        if (!ClassUtils.isClassOnPath(protocolTransactionFactoryClassName, getClass()))
        {
            throw new TransactionException(
                MessageFactory.createStaticMessage("Failed to locate a transaction factory for protocol: "
                                                   + protocol));
        }

        try
        {
            return (TransactionFactory) ClassUtils.instanciateClass(protocolTransactionFactoryClassName);
        }
        catch (Exception e)
        {
            throw new TransactionException(
                MessageFactory.createStaticMessage("Failed to instantiate a transaction factory for protocol: "
                                                   + protocol), e);
        }
    }
View Full Code Here

            // Verify transaction has begun.
            Transaction currentTx = context.getCurrentTransaction();
            if (currentTx == null || !currentTx.isBegun())
            {   
                context.setStopFurtherProcessing(true);
                throw new TransactionException(MessageFactory.createStaticMessage("Trying to roll back transaction but no transaction is underway."));
            }           

            if (rollback)
            {
                // Mark the transaction for rollback.
View Full Code Here

        } else {
          log.error("Connection is null, cannot enlist");
          return true;
        }
      } catch (Exception e) {
        throw new TransactionException(e);
      }

    }
    return enlisted;
  }
View Full Code Here

TOP

Related Classes of org.mule.api.transaction.TransactionException

Copyright © 2018 www.massapicom. 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.