congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TransactionException
Code IndexAdd Tabnine to your IDE (free)

How to use
TransactionException
in
org.eclipse.persistence.exceptions

Best Java code snippets using org.eclipse.persistence.exceptions.TransactionException (Showing top 20 results out of 315)

origin: com.haulmont.thirdparty/eclipselink

public static TransactionException errorBindingToExternalTransaction(Exception internalException) {
  Object[] args = {  };
  TransactionException ex = new TransactionException(ExceptionMessageGenerator.buildMessage(TransactionException.class, ERROR_BINDING_TO_TRANSACTION, args));
  ex.setErrorCode(ERROR_BINDING_TO_TRANSACTION);
  ex.setInternalException(internalException);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

protected void throwCheckTransactionFailedException() {
  throw new TransactionRequiredException(TransactionException.externalTransactionNotActive().getMessage());
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

public static TransactionException internalProxyException(Exception ex1) {
  Object[] args = {  };
  TransactionException ex = new TransactionException(ExceptionMessageGenerator.buildMessage(TransactionException.class, EXCEPTION_IN_PROXY_EXECUTION, args), ex1);
  ex.setErrorCode(EXCEPTION_IN_PROXY_EXECUTION);
  return ex;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

throw TransactionException.externalTransactionNotActive();
    registerSynchronization_impl(listener, transaction);
  } catch (Exception exception) {
    throw TransactionException.errorBindingToExternalTransaction(exception);
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Return the transaction status. This may be any type of status or value,
 * depending upon the transaction system.
 */
public Object getTransactionStatus() {
  try {
    return getTransactionStatus_impl();
  } catch (Exception exception) {
    throw TransactionException.errorGettingExternalTransactionStatus(exception);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Return the active external transaction object, or null if
 * none is active. This may be in whatever form the transaction system uses.
 */
public Object getTransaction() {
  try {
    return getTransaction_impl();
  } catch (Exception exception) {
    throw TransactionException.errorGettingExternalTransaction(exception);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Mark the external transaction for rollback.
 */
public void markTransactionForRollback() {
  try {
    markTransactionForRollback_impl();
  } catch (Exception exception) {
    throw TransactionException.errorMarkingTransactionForRollback(exception);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * PUBLIC:
 * Return a new controller for use with a JTA 1.0 compliant TransactionManager.
 */
public JTATransactionController() {
  super();
  this.listenerFactory = new JTASynchronizationListener();
  try {
    this.transactionManager = acquireTransactionManager();
  } catch (Exception ex) {
    throw TransactionException.errorObtainingTransactionManager(ex);
  }
}
 
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Commit the external transaction.
 *
 * @param session The session for which the transaction is being committed.
 */
public void commitTransaction(AbstractSession session) {
  try {
    Object status = getTransactionStatus();
    logTxStateTrace(session, "TX_commit", status);
    if (canCommitTransaction_impl(status)) {
      logTxTrace(session, "TX_committingTxn", null);
      session.setWasJTSTransactionInternallyStarted(false);
      commitTransaction_impl();
    }
  } catch (Exception exception) {
    throw TransactionException.errorCommittingExternalTransaction(exception);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Begin an external transaction.
 *
 * @param session The session for which the transaction is being begun.
 */
public void beginTransaction(AbstractSession session) {
  try {
    Object status = getTransactionStatus();
    logTxStateTrace(session, "TX_begin", status);
    // Make sure that we are in a state that we can actually start
    // a transaction (e.g. ensure one is not already in progress)
    if (canBeginTransaction_impl(status)) {
      logTxTrace(session, "TX_beginningTxn", null);
      beginTransaction_impl();
      session.setWasJTSTransactionInternallyStarted(true);
    }
  } catch (Exception exception) {
    throw TransactionException.errorBeginningExternalTransaction(exception);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Roll back the external transaction.
 *
 * @param session The session for which the transaction is being rolled back.
 */
public void rollbackTransaction(AbstractSession session) {
  try {
    Object status = getTransactionStatus();
    logTxStateTrace(session, "TX_rollback", status);
    session.setWasJTSTransactionInternallyStarted(false);
    // Only roll back if there is a transaction to roll back
    if ((canRollbackTransaction_impl(status)) && (getTransaction() != null)) {
      logTxTrace(session, "TX_rollingBackTxn", null);
      rollbackTransaction_impl();
    }
  } catch (Exception exception) {
    throw TransactionException.errorRollingBackExternalTransaction(exception);
  }
}
origin: com.haulmont.thirdparty/eclipselink

throw new PersistenceException(TransactionException.errorBindingToExternalTransaction(e).getMessage(), e);
origin: com.haulmont.thirdparty/eclipselink

public static TransactionException externalTransactionNotActive() {
  Object[] args = {  };
  TransactionException ex = new TransactionException(ExceptionMessageGenerator.buildMessage(TransactionException.class, ERROR_NO_EXTERNAL_TRANSACTION_ACTIVE, args));
  ex.setErrorCode(ERROR_NO_EXTERNAL_TRANSACTION_ACTIVE);
  return ex;
}
origin: com.haulmont.thirdparty/eclipselink

throw TransactionException.externalTransactionNotActive();
    registerSynchronization_impl(listener, transaction);
  } catch (Exception exception) {
    throw TransactionException.errorBindingToExternalTransaction(exception);
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Return the transaction status. This may be any type of status or value,
 * depending upon the transaction system.
 */
public Object getTransactionStatus() {
  try {
    return getTransactionStatus_impl();
  } catch (Exception exception) {
    throw TransactionException.errorGettingExternalTransactionStatus(exception);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Return the active external transaction object, or null if
 * none is active. This may be in whatever form the transaction system uses.
 */
public Object getTransaction() {
  try {
    return getTransaction_impl();
  } catch (Exception exception) {
    throw TransactionException.errorGettingExternalTransaction(exception);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Mark the external transaction for rollback.
 */
public void markTransactionForRollback() {
  try {
    markTransactionForRollback_impl();
  } catch (Exception exception) {
    throw TransactionException.errorMarkingTransactionForRollback(exception);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * PUBLIC:
 * Return a new controller for use with a JTA 1.0 compliant TransactionManager.
 */
public JTATransactionController() {
  super();
  this.listenerFactory = new JTASynchronizationListener();
  try {
    this.transactionManager = acquireTransactionManager();
  } catch (Exception ex) {
    throw TransactionException.errorObtainingTransactionManager(ex);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Commit the external transaction.
 *
 * @param session The session for which the transaction is being committed.
 */
public void commitTransaction(AbstractSession session) {
  try {
    Object status = getTransactionStatus();
    logTxStateTrace(session, "TX_commit", status);
    if (canCommitTransaction_impl(status)) {
      logTxTrace(session, "TX_committingTxn", null);
      session.setWasJTSTransactionInternallyStarted(false);
      commitTransaction_impl();
    }
  } catch (Exception exception) {
    throw TransactionException.errorCommittingExternalTransaction(exception);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Begin an external transaction.
 *
 * @param session The session for which the transaction is being begun.
 */
public void beginTransaction(AbstractSession session) {
  try {
    Object status = getTransactionStatus();
    logTxStateTrace(session, "TX_begin", status);
    // Make sure that we are in a state that we can actually start 
    // a transaction (e.g. ensure one is not already in progress)
    if (canBeginTransaction_impl(status)) {
      logTxTrace(session, "TX_beginningTxn", null);
      beginTransaction_impl();
      session.setWasJTSTransactionInternallyStarted(true);
    }
  } catch (Exception exception) {
    throw TransactionException.errorBeginningExternalTransaction(exception);
  }
}
org.eclipse.persistence.exceptionsTransactionException

Most used methods

  • <init>
  • errorBeginningExternalTransaction
  • errorBindingToExternalTransaction
  • errorCommittingExternalTransaction
  • errorGettingExternalTransaction
  • errorGettingExternalTransactionStatus
  • errorMarkingTransactionForRollback
  • errorObtainingTransactionManager
  • errorRollingBackExternalTransaction
  • externalTransactionNotActive
  • inactiveUnitOfWork
  • jndiLookupException
  • inactiveUnitOfWork,
  • jndiLookupException,
  • setErrorCode,
  • setInternalException,
  • getErrorCode,
  • entityTransactionWithJTANotAllowed,
  • getMessage,
  • internalProxyException,
  • multipleResourceException,
  • transactionIsActive

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • Menu (java.awt)
  • Kernel (java.awt.image)
  • Path (java.nio.file)
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now