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

How to use
Withdrawal
in
org.jboss.cdi.tck.tests.event.observer.transactional

Best Java code snippets using org.jboss.cdi.tck.tests.event.observer.transactional.Withdrawal (Showing top 5 results out of 315)

origin: org.jboss.cdi.tck/cdi-tck-impl

/**
 * 
 * @param amount
 * @throws Exception
 */
public void withdrawNoTransaction(int amount) throws Exception {
  event.fire(new Withdrawal(amount));
  ActionSequence.addAction("checkpoint");
}
origin: org.jboss.cdi.tck/cdi-tck-impl

/**
 * 
 * @param amount
 * @throws Exception
 */
public void withdrawFailedTransaction(int amount) throws Exception {
  userTransaction.begin();
  event.fire(new Withdrawal(amount));
  ActionSequence.addAction("checkpoint");
  // Failed for any reason
  userTransaction.rollback();
}
origin: org.jboss.cdi.tck/cdi-tck-impl

/**
 * 
 * @param amount
 * @throws Exception
 */
public void withdrawSuccesTransaction(int amount) throws Exception {
  userTransaction.begin();
  event.fire(new Withdrawal(amount));
  ActionSequence.addAction("checkpoint");
  userTransaction.commit();
}
origin: stackoverflow.com

 public void withdraw(long n) {
  queueAction(new Withdrawal(n));
}

public void deposit(long n) {
  queueAction(new Deposit(n));
}

void queueAction(Action action) {
  action.doAction();
  if (actionsList.size() >= 10)
    actionsList.poll();
  actionsList.offer(aaction);
}
origin: org.jboss.cdi.tck/cdi-tck-impl

/**
 * 
 * @param amount
 * @throws Exception
 */
public void withdrawObserverFailedTransaction(int amount) throws Exception {
  userTransaction.begin();
  event.fire(new Withdrawal(amount));
  eventFailure.fire(new Failure());
  ActionSequence.addAction("checkpoint");
  if (userTransaction.getStatus() == Status.STATUS_MARKED_ROLLBACK) {
    userTransaction.rollback();
  } else {
    userTransaction.commit();
  }
}
org.jboss.cdi.tck.tests.event.observer.transactionalWithdrawal

Most used methods

  • <init>

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top 17 Free Sublime Text Plugins
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