Tabnine Logo
BitronixRuntimeException
Code IndexAdd Tabnine to your IDE (free)

How to use
BitronixRuntimeException
in
bitronix.tm.internal

Best Java code snippets using bitronix.tm.internal.BitronixRuntimeException (Showing top 20 results out of 315)

origin: ehcache/ehcache3

@Override
public void init() {
 try {
  ResourceRegistrar.register(this);
 } catch (RecoveryException ex) {
  throw new BitronixRuntimeException("error recovering " + this, ex);
 }
}
origin: org.mule.btm/mule-btm

public void waitFor(Object future, long timeout) {
  Future<?> f = (Future<?>) future;
  try {
    f.get(timeout, TimeUnit.MILLISECONDS);
  } catch (InterruptedException ex) {
    throw new BitronixRuntimeException("job interrupted", ex);
  } catch (ExecutionException ex) {
    throw new BitronixRuntimeException("job execution exception", ex);
  } catch (TimeoutException ex) {
    // ok, just return
  }
}
origin: org.codehaus.btm/btm

public void waitFor(Object future, long timeout) {
  Future<?> f = (Future<?>) future;
  try {
    f.get(timeout, TimeUnit.MILLISECONDS);
  } catch (InterruptedException ex) {
    throw new BitronixRuntimeException("job interrupted", ex);
  } catch (ExecutionException ex) {
    throw new BitronixRuntimeException("job execution exception", ex);
  } catch (TimeoutException ex) {
    // ok, just return
  }
}
origin: bitronix/btm

@Override
public void waitFor(Object future, long timeout) {
  Future<?> f = (Future<?>) future;
  try {
    f.get(timeout, TimeUnit.MILLISECONDS);
  } catch (InterruptedException ex) {
    throw new BitronixRuntimeException("job interrupted", ex);
  } catch (ExecutionException ex) {
    throw new BitronixRuntimeException("job execution exception", ex);
  } catch (TimeoutException ex) {
    // ok, just return
  }
}
origin: com.github.marcus-nl.btm/btm

@Override
public void waitFor(Object future, long timeout) {
  Future<?> f = (Future<?>) future;
  try {
    f.get(timeout, TimeUnit.MILLISECONDS);
  } catch (InterruptedException ex) {
    throw new BitronixRuntimeException("job interrupted", ex);
  } catch (ExecutionException ex) {
    throw new BitronixRuntimeException("job execution exception", ex);
  } catch (TimeoutException ex) {
    // ok, just return
  }
}
origin: bitronix/btm

/**
 * {@inheritDoc}
 */
@Override
public void init() {
  try {
    ResourceRegistrar.register(this);
  } catch (RecoveryException ex) {
    throw new BitronixRuntimeException("error recovering " + this, ex);
  }
}
origin: org.codehaus.btm/btm

/**
 * {@inheritDoc}
 */
public void init() {
  try {
    ResourceRegistrar.register(this);
  } catch (RecoveryException ex) {
    throw new BitronixRuntimeException("error recovering " + this, ex);
  }
}
origin: com.github.marcus-nl.btm/btm

/**
 * {@inheritDoc}
 */
@Override
public void init() {
  try {
    ResourceRegistrar.register(this);
  } catch (RecoveryException ex) {
    throw new BitronixRuntimeException("error recovering " + this, ex);
  }
}
origin: org.mule.btm/mule-btm

/**
 * {@inheritDoc}
 */
public void init() {
  try {
    ResourceRegistrar.register(this);
  } catch (RecoveryException ex) {
    throw new BitronixRuntimeException("error recovering " + this, ex);
  }
}
origin: org.ehcache/ehcache-transactions

@Override
public void init() {
 try {
  ResourceRegistrar.register(this);
 } catch (RecoveryException ex) {
  throw new BitronixRuntimeException("error recovering " + this, ex);
 }
}
origin: org.codehaus.btm/btm

private synchronized XAStatefulHolder getInPool() throws Exception {
  if (log.isDebugEnabled()) log.debug("getting a IN_POOL connection from " + this);
  if (inPoolSize() == 0) {
    if (log.isDebugEnabled()) log.debug("no more free connection in " + this + ", trying to grow it");
    grow();
  }
  waitForConnectionInPool();
  for (XAStatefulHolder xaStatefulHolder : objects) {
    if (xaStatefulHolder.getState() == XAStatefulHolder.STATE_IN_POOL)
      return xaStatefulHolder;
  }
  throw new BitronixRuntimeException("pool does not contain IN_POOL connection while it should !");
}
origin: org.codehaus.btm/btm

public Object getResource(Object key) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    return getResources().get(key);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: bitronix/btm

@Override
public Object getResource(Object key) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    return getResources().get(key);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: org.mule.btm/mule-btm

private synchronized XAStatefulHolder getInPool() throws Exception {
  if (log.isDebugEnabled()) log.debug("getting a IN_POOL connection from " + this);
  if (inPoolSize() == 0) {
    if (log.isDebugEnabled()) log.debug("no more free connection in " + this + ", trying to grow it");
    grow();
  }
  waitForConnectionInPool();
  for (XAStatefulHolder xaStatefulHolder : objects) {
    if (xaStatefulHolder.getState() == XAStatefulHolder.STATE_IN_POOL)
      return xaStatefulHolder;
  }
  throw new BitronixRuntimeException("pool does not contain IN_POOL connection while it should !");
}
origin: org.mule.btm/mule-btm

public void putResource(Object key, Object value) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    getResources().put(key, value);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: org.codehaus.btm/btm

public void putResource(Object key, Object value) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    getResources().put(key, value);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: com.github.marcus-nl.btm/btm

@Override
public Object getResource(Object key) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    return getResources().get(key);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: org.mule.btm/mule-btm

public Object getResource(Object key) {
  try {
    if (key == null)
      throw new NullPointerException("key cannot be null");
    if (currentTransaction() == null || currentTransaction().getStatus() == Status.STATUS_NO_TRANSACTION)
      throw new IllegalStateException("no transaction started on current thread");
    return getResources().get(key);
  } catch (SystemException ex) {
    throw new BitronixRuntimeException("cannot get current transaction status", ex);
  }
}
origin: com.github.marcus-nl.btm/btm

private void reinitializePool() {
  try {
    if (log.isDebugEnabled()) { log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, resetting and recovering it before trying connection acquisition"); }
    close();
    init();
    IncrementalRecoverer.recover(xaResourceProducer);
  }
  catch (RecoveryException ex) {
    throw new BitronixRuntimeException("incremental recovery failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
  }
  catch (Exception ex) {
    throw new BitronixRuntimeException("pool reset failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
  }
}
origin: bitronix/btm

private void reinitializePool() {
  try {
    if (log.isDebugEnabled()) { log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, resetting and recovering it before trying connection acquisition"); }
    close();
    init();
    IncrementalRecoverer.recover(xaResourceProducer);
  }
  catch (RecoveryException ex) {
    throw new BitronixRuntimeException("incremental recovery failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
  }
  catch (Exception ex) {
    throw new BitronixRuntimeException("pool reset failed when trying to acquire a connection from failed resource '" + bean.getUniqueName() + "'", ex);
  }
}
bitronix.tm.internalBitronixRuntimeException

Javadoc

Thrown when a runtime exception happens.

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • From CI to AI: The AI layer in your organization
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