Codota Logo
TransactionException.multipleResourceException
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain TransactionException
private void myMethod () {
TransactionException t =
  • Codota IconObject[] arguments;new TransactionException(ExceptionMessageGenerator.buildMessage(TransactionException.class, errorNumber, arguments))
  • Codota IconTransactionException.externalTransactionNotActive()
  • Codota IconUnitOfWorkImpl unitOfWork;TransactionException.inactiveUnitOfWork(unitOfWork)
  • Smart code suggestions by Codota
}
origin: com.haulmont.thirdparty/eclipselink

public Connection getConnection(DataSourceImpl ds, String user, String password) throws SQLException {
  // We don't have a datasource connection yet, so allocate one
  if (connection == null) {
    debug("TxImpl - allocating new connection");
    dataSource = ds;
    connection = ds.internalGetConnection(user, password);
    connection.setAutoCommit(false);
  } else {
    // We already have a connection. Make sure the data sources are the same.
    if (ds.getName() != dataSource.getName()) {
      throw TransactionException.multipleResourceException();
    }
  }
  //  return connection;
  // Allocate and return a proxy for the connection
  debug("TxImpl - creating connection proxy");
  Connection proxyConnection = null;
  try {
    InvocationHandler handler = new ConnectionProxyHandler(connection);
    proxyConnection = (Connection)proxyClass.getConstructor(new Class[] { InvocationHandler.class }).newInstance(new Object[] { handler });
  } catch (Exception ex) {
    throw TransactionException.internalProxyException(ex);
  }
  return proxyConnection;
}
org.eclipse.persistence.exceptionsTransactionExceptionmultipleResourceException

Popular methods of TransactionException

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

Popular in Java

  • Reading from database using SQL prepared statement
  • setScale (BigDecimal)
  • getSystemService (Context)
  • getContentResolver (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JPanel (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now