Tabnine Logo
TransactionException.getMessage
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.haulmont.thirdparty/eclipselink

/**
 *  An ENtityTransaction cannot be used at the same time as a JTA transaction
 *  throw an exception
 */
public EntityTransaction getTransaction(){
 throw new IllegalStateException(TransactionException.entityTransactionWithJTANotAllowed().getMessage());
}
  
origin: com.haulmont.thirdparty/eclipselink

/**
 * Determine whether the current transaction has been marked for rollback.
 * 
 * @throws IllegalStateException
 *             if isActive() is false.
 */
public boolean getRollbackOnly() {
  if (!isActive()) {
    throw new IllegalStateException(TransactionException.transactionNotActive().getMessage());
  }
  return this.rollbackOnly;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Mark the current transaction so that the only possible outcome of the
 * transaction is for the transaction to be rolled back.
 * 
 * @throws IllegalStateException
 *             if isActive() is false.
 */
public void setRollbackOnly() {
  if (!isActive()) {
    throw new IllegalStateException(TransactionException.transactionNotActive().getMessage());
  }
  this.rollbackOnly = true;
}
origin: com.haulmont.thirdparty/eclipselink

protected void throwCheckTransactionFailedException() {
  throw new TransactionRequiredException(TransactionException.transactionNotActive().getMessage());
}    
origin: com.haulmont.thirdparty/eclipselink

protected void throwCheckTransactionFailedException() {
  throw new TransactionRequiredException(TransactionException.externalTransactionNotActive().getMessage());
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Start the current transaction. This can only be invoked if
 * {@link #isActive()} returns <code>false</code>.
 * 
 * @throws IllegalStateException
 *             if isActive() is true.
 */
public void begin() {
  if (isActive()) {
    throw new IllegalStateException(TransactionException.transactionIsActive().getMessage());
  }
  //bug307445 : Throw IllegalStateException if entityManager was closed
  this.wrapper.getEntityManager().verifyOpen();
  // always extended
  this.wrapper.localUOW = this.wrapper.getEntityManager().getActivePersistenceContext(null);
  this.wrapper.localUOW.setShouldTerminateTransaction(false);
  this.active = true;
}
origin: com.haulmont.thirdparty/eclipselink

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

/**
 * Roll back the current transaction, discarding any changes that have
 * happened in this transaction. This can only be invoked if
 * {@link #isActive()} returns <code>true</code>.
 * 
 * @throws IllegalStateException
 *             if isActive() is false.
 */
public void rollback() {
  if (!isActive()) {
    throw new IllegalStateException(TransactionException.transactionNotActive().getMessage());
  }
  
  // Make sure any open queries are closed.
  closeOpenQueries();
  
  try {
    if (wrapper.getLocalUnitOfWork() != null) {
      this.wrapper.localUOW.setShouldTerminateTransaction(true);
      this.wrapper.localUOW.release();
      this.wrapper.localUOW.getParent().release();
    }
  } finally {
    this.active = false;
    this.rollbackOnly = false;
    this.wrapper.getEntityManager().removeExtendedPersistenceContext();
    this.wrapper.setLocalUnitOfWork(null);
  }
}
origin: com.haulmont.thirdparty/eclipselink

throw new IllegalStateException(TransactionException.transactionNotActive().getMessage());
org.eclipse.persistence.exceptionsTransactionExceptiongetMessage

Popular methods of TransactionException

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

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JComboBox (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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