Tabnine Logo
PGXAException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.postgresql.xa.PGXAException
constructor

Best Java code snippets using org.postgresql.xa.PGXAException.<init> (Showing top 20 results out of 315)

origin: org.postgresql/postgresql

/**
 * Does nothing, since we don't do heuristics.
 */
@Override
public void forget(Xid xid) throws XAException {
 throw new PGXAException(GT.tr("Heuristic commit/rollback not supported. forget xid={0}", xid),
   XAException.XAER_NOTA);
}
origin: postgresql/postgresql

/**
 * Does nothing, since we don't do heuristics, 
 */
public void forget(Xid xid) throws XAException {
  throw new PGXAException(GT.tr("Heuristic commit/rollback not supported"), XAException.XAER_NOTA);
}
origin: org.postgresql/postgresql

throw new PGXAException(GT.tr("Invalid flags {0}", flags), XAException.XAER_INVAL);
throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
throw new PGXAException(GT.tr("tried to call end without corresponding start call. state={0}, start xid={1}, currentXid={2}, preparedXid={3}", state, xid, currentXid, preparedXid),
  XAException.XAER_PROTO);
throw new PGXAException(GT.tr("suspend/resume not implemented"), XAException.XAER_RMERR);
origin: postgresql/postgresql

/**
 * Preconditions:
 * 1. Flags is one of TMSUCCESS, TMFAIL, TMSUSPEND
 * 2. xid != null
 * 3. Connection is associated with transaction xid
 *
 * Implementation deficiency preconditions:
 * 1. Flags is not TMSUSPEND
 * 
 * Postconditions:
 * 1. connection is disassociated from the transaction.
 */
public void end(Xid xid, int flags) throws XAException {
  if (logger.logDebug())
    debug("ending transaction xid = " + xid);
  // Check preconditions
  if (flags != XAResource.TMSUSPEND && flags != XAResource.TMFAIL && flags != XAResource.TMSUCCESS)
    throw new PGXAException(GT.tr("Invalid flags"), XAException.XAER_INVAL);
  if (xid == null)
    throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
  if (state != STATE_ACTIVE || !currentXid.equals(xid))
    throw new PGXAException(GT.tr("tried to call end without corresponding start call"), XAException.XAER_PROTO);
  // Check implementation deficiency preconditions
  if (flags == XAResource.TMSUSPEND)
    throw new PGXAException(GT.tr("suspend/resume not implemented"), XAException.XAER_RMERR);
  // We ignore TMFAIL. It's just a hint to the RM. We could roll back immediately
  // if TMFAIL was given.
  // All clear. We don't have any real work to do.
  state = STATE_ENDED;
}
origin: org.postgresql/postgresql

throw new PGXAException(GT.tr("Invalid flags {0}", flag), XAException.XAER_INVAL);
 throw new PGXAException(GT.tr("Error during recover"), ex, XAException.XAER_RMERR);
origin: postgresql/postgresql

throw new PGXAException(GT.tr("Invalid flag"), XAException.XAER_INVAL);
  throw new PGXAException(GT.tr("Error during recover"), ex, XAException.XAER_RMERR);
origin: postgresql/postgresql

  throw new PGXAException(GT.tr("Not implemented: one-phase commit must be issued using the same connection that was used to start it"),
              XAException.XAER_RMERR);
  throw new PGXAException(GT.tr("commit called before end"), XAException.XAER_PROTO);
throw new PGXAException(GT.tr("Error during one-phase commit"), ex, XAException.XAER_RMERR);
origin: org.postgresql/postgresql

  throw new PGXAException(GT.tr("One-phase commit called for xid {0} but connection was prepared with xid {1}",
    xid, preparedXid), XAException.XAER_PROTO);
  throw new PGXAException(GT.tr(
    "Not implemented: one-phase commit must be issued using the same connection that was used to start it", xid),
    XAException.XAER_RMERR);
  throw new PGXAException(GT.tr("One-phase commit with unknown xid. commit xid={0}, currentXid={1}",
    xid, currentXid), XAException.XAER_NOTA);
  throw new PGXAException(GT.tr("commit called before end. commit xid={0}, state={1}", xid, state), XAException.XAER_PROTO);
 conn.setAutoCommit(localAutoCommitMode);
} catch (SQLException ex) {
 throw new PGXAException(GT.tr("Error during one-phase commit. commit xid={0}", xid), ex, mapSQLStateToXAErrorCode(ex));
origin: org.postgresql/postgresql

@Override
public void commit(Xid xid, boolean onePhase) throws XAException {
 if (LOGGER.isLoggable(Level.FINEST)) {
  debug("committing xid = " + xid + (onePhase ? " (one phase) " : " (two phase)"));
 }
 if (xid == null) {
  throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
 }
 if (onePhase) {
  commitOnePhase(xid);
 } else {
  commitPrepared(xid);
 }
}
origin: org.postgresql/postgresql

throw new PGXAException(GT.tr("Invalid flags {0}", flags), XAException.XAER_INVAL);
throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
throw new PGXAException(GT.tr("Connection is busy with another transaction"),
  XAException.XAER_PROTO);
throw new PGXAException(GT.tr("suspend/resume not implemented"), XAException.XAER_RMERR);
 throw new PGXAException(
   GT.tr(
     "Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}",
 throw new PGXAException(
   GT.tr(
     "Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}",
throw new PGXAException(GT.tr("Invalid protocol state requested. Attempted transaction interleaving is not supported. xid={0}, currentXid={1}, state={2}, flags={3}", xid, currentXid, state, flags),
  XAException.XAER_RMERR);
 conn.setAutoCommit(false);
} catch (SQLException ex) {
 throw new PGXAException(GT.tr("Error disabling autocommit"), ex, XAException.XAER_RMERR);
origin: postgresql/postgresql

  throw new PGXAException(GT.tr("Invalid flags"), XAException.XAER_INVAL);
  throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
  throw new PGXAException(GT.tr("Connection is busy with another transaction"), XAException.XAER_PROTO);
  throw new PGXAException(GT.tr("suspend/resume not implemented"), XAException.XAER_RMERR);
    throw new PGXAException(GT.tr("Transaction interleaving not implemented"), XAException.XAER_RMERR);
    throw new PGXAException(GT.tr("Transaction interleaving not implemented"), XAException.XAER_RMERR);
} else if(state == STATE_ENDED)
  throw new PGXAException(GT.tr("Transaction interleaving not implemented"), XAException.XAER_RMERR);
  throw new PGXAException(GT.tr("Error disabling autocommit"), ex, XAException.XAER_RMERR);
origin: org.postgresql/postgresql

    + " while it was prepared in past with prepared xid " + preparedXid);
 throw new PGXAException(GT.tr(
   "Preparing already prepared transaction, the prepared xid {0}, prepare xid={1}", preparedXid, xid), XAException.XAER_PROTO);
} else if (currentXid == null) {
 throw new PGXAException(GT.tr(
   "Current connection does not have an associated xid. prepare xid={0}", xid), XAException.XAER_NOTA);
  debug("Error to prepare xid " + xid + ", the current connection already bound with xid " + currentXid);
 throw new PGXAException(GT.tr(
   "Not implemented: Prepare must be issued using the same connection that started the transaction. currentXid={0}, prepare xid={1}", currentXid, xid),
   XAException.XAER_RMERR);
 throw new PGXAException(GT.tr("Prepare called before end. prepare xid={0}, state={1}", xid), XAException.XAER_INVAL);
 throw new PGXAException(GT.tr("Error preparing transaction. prepare xid={0}", xid), ex, mapSQLStateToXAErrorCode(ex));
origin: postgresql/postgresql

throw new PGXAException(GT.tr("Not implemented: Prepare must be issued using the same connection that started the transaction"),
            XAException.XAER_RMERR);
throw new PGXAException(GT.tr("Prepare called before end"), XAException.XAER_INVAL);
throw new PGXAException(GT.tr("Server versions prior to 8.1 do not support two-phase commit."), XAException.XAER_RMERR);
throw new PGXAException(GT.tr("Error preparing transaction"), ex, XAException.XAER_RMERR);
origin: org.postgresql/postgresql

throw new PGXAException(GT.tr("Error rolling back prepared transaction. rollback xid={0}, preparedXid={1}, currentXid={2}", xid, preparedXid), ex, errorCode);
origin: org.postgresql/postgresql

 throw new PGXAException(
   GT.tr("Not implemented: 2nd phase commit must be issued using an idle connection. commit xid={0}, currentXid={1}, state={2], transactionState={3}", xid, currentXid, state, conn.getTransactionState()),
   XAException.XAER_RMERR);
throw new PGXAException(GT.tr("Error committing prepared transaction. commit xid={0}, preparedXid={1}, currentXid={2}", xid, preparedXid, currentXid), ex, errorCode);
origin: postgresql/postgresql

public void commit(Xid xid, boolean onePhase) throws XAException {
  if (logger.logDebug())
    debug("committing xid = " + xid + (onePhase ? " (one phase) " : " (two phase)"));
  if (xid == null)
    throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
  if (onePhase)
    commitOnePhase(xid);
  else
    commitPrepared(xid);
}
origin: postgresql/postgresql

  throw new PGXAException(GT.tr("Not implemented: 2nd phase commit must be issued using an idle connection"),
              XAException.XAER_RMERR);
throw new PGXAException(GT.tr("Error committing prepared transaction"), ex, XAException.XAER_RMERR);
origin: postgresql/postgresql

throw new PGXAException(GT.tr("Error rolling back prepared transaction"), ex, XAException.XAER_RMERR);
origin: org.ancoron.postgresql/org.postgresql

/**
 * Does nothing, since we don't do heuristics, 
 */
public void forget(Xid xid) throws XAException {
  throw new PGXAException(GT.tr("Heuristic commit/rollback not supported"), XAException.XAER_NOTA);
}
origin: org.ancoron.postgresql/org.postgresql

public void commit(Xid xid, boolean onePhase) throws XAException {
  if (logger.logDebug())
    debug("committing xid = " + xid + (onePhase ? " (one phase) " : " (two phase)"));
  if (xid == null)
    throw new PGXAException(GT.tr("xid must not be null"), XAException.XAER_INVAL);
  if (onePhase)
    commitOnePhase(xid);
  else
    commitPrepared(xid);
}
org.postgresql.xaPGXAException<init>

Popular methods of PGXAException

  • initCause

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSystemService (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim 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