Package javax.resource.spi

Examples of javax.resource.spi.LocalTransactionException


      return this;
    }
    catch (JMSException exc) {
        if (out != null)
            out.print("Could not build underlying transacted JMS session: " + exc);
      throw new LocalTransactionException("Could not build underlying "
                                          + "transacted JMS session: " + exc);
    }
  }
View Full Code Here


    if (! isValid())
      throw new CommException("Physical connection to the underlying "
                              + "JORAM server has been lost.");

    if (startedLocalTx)
      throw new LocalTransactionException("Local transaction has "
                                          + "already begun.");

    ConnectionEvent event =
      new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_STARTED);
View Full Code Here

    if (! isValid())
      throw new CommException("Physical connection to the underlying "
                              + "JORAM server has been lost.");

    if (! startedLocalTx)
      throw new LocalTransactionException("Local transaction has not begun.");

    try {
      session.commit();
    }
    catch (JMSException exc) {
      throw new LocalTransactionException("Commit of the transacted JMS "
                                          + "session failed: " + exc);
    }

    ConnectionEvent event =
      new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_COMMITTED);
View Full Code Here

    if (! isValid())
      throw new CommException("Physical connection to the underlying "
                              + "JORAM server has been lost.");

    if (! startedLocalTx)
      throw new LocalTransactionException("Local transaction has not begun.");

    try {
      session.rollback();
    }
    catch (JMSException exc) {
      throw new LocalTransactionException("Rollback of the transacted JMS "
                                          + "session failed: " + exc);
    }

    ConnectionEvent event =
      new ConnectionEvent(this, ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK);
View Full Code Here

            if (previousTx != null) {
                tm.resume(previousTx);
                previousTx = null;
            }
        } catch (InvalidTransactionException e) {
            throw new LocalTransactionException(e);
        } catch (HeuristicMixedException e) {
            throw new LocalTransactionException(e);
        } catch (SystemException e) {
            throw new LocalTransactionException(e);
        } catch (HeuristicRollbackException e) {
            throw new LocalTransactionException(e);
        } catch (RollbackException e) {
            throw new LocalTransactionException(e);
        } finally {
            doPrivileged(contextClassLoader(previousClassLoader));
            previousClassLoader = null;
        }
    }
View Full Code Here

            if (previousTx != null) {
                tm.resume(previousTx);
                previousTx = null;
            }
        } catch (InvalidTransactionException e) {
            throw new LocalTransactionException(e);
        } catch (HeuristicMixedException e) {
            throw new LocalTransactionException(e);
        } catch (SystemException e) {
            throw new LocalTransactionException(e);
        } catch (HeuristicRollbackException e) {
            throw new LocalTransactionException(e);
        } catch (RollbackException e) {
            throw new LocalTransactionException(e);
        } finally {
            doPrivileged(contextClassLoader(previousClassLoader));
            previousClassLoader = null;
        }
    }
View Full Code Here

        //GJCINT
        mc.transactionStarted();
        try {
            mc.getActualConnection().setAutoCommit(false);
        } catch (java.sql.SQLException sqle) {
            throw new LocalTransactionException(sqle.getMessage());
        }
    }
View Full Code Here

    public void commit() throws ResourceException {
        try {
            mc.getActualConnection().commit();
            mc.getActualConnection().setAutoCommit(true);
        } catch (java.sql.SQLException sqle) {
            throw new LocalTransactionException(sqle.getMessage());
        }finally{
            //GJCINT
            mc.transactionCompleted();
        }
    }
View Full Code Here

    public void rollback() throws ResourceException {
        try {
            mc.getActualConnection().rollback();
            mc.getActualConnection().setAutoCommit(true);
        } catch (java.sql.SQLException sqle) {
            throw new LocalTransactionException(sqle.getMessage());
        }finally{
            //GJCINT
            mc.transactionCompleted();
        }
    }
View Full Code Here

            mc.getActualConnection().setAutoCommit(false);
        } catch (java.sql.SQLException sqle) {
            if(_logger.isLoggable(Level.FINEST)){
                _logger.finest("Exception during begin() : " + sqle);
            }
            throw new LocalTransactionException(sqle.getMessage(), sqle);
        }
    }
View Full Code Here

TOP

Related Classes of javax.resource.spi.LocalTransactionException

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.