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

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

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

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.exceptionsTransactionExceptioninternalProxyException

Popular methods of TransactionException

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

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top 25 Plugins for Webstorm
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