Examples of TransactionListener


Examples of com.bitsofproof.supernode.api.TransactionListener

  @Override
  public void syncHistory (BCSAPI api) throws BCSAPIException
  {
    reset ();
    log.trace ("Sync naddr: " + keys.size ());
    api.scanTransactionsForAddresses (getAddresses (), UpdateMode.all, getCreated (), new TransactionListener ()
    {
      @Override
      public void process (Transaction t)
      {
        updateWithTransaction (t);
View Full Code Here

Examples of com.bitsofproof.supernode.api.TransactionListener

  @Override
  public void sync (BCSAPI api) throws BCSAPIException
  {
    reset ();
    log.trace ("Sync naddr: " + keys.size ());
    api.scanUTXOForAddresses (getAddresses (), UpdateMode.all, getCreated (), new TransactionListener ()
    {
      @Override
      public void process (Transaction t)
      {
        updateWithTransaction (t);
View Full Code Here

Examples of com.bitsofproof.supernode.api.TransactionListener

  @Override
  public void syncHistory (BCSAPI api) throws BCSAPIException
  {
    reset ();
    log.trace ("Sync naddr: " + addresses.size ());
    api.scanTransactionsForAddresses (getAddresses (), UpdateMode.all, getCreated (), new TransactionListener ()
    {
      @Override
      public void process (Transaction t)
      {
        updateWithTransaction (t);
View Full Code Here

Examples of com.bitsofproof.supernode.api.TransactionListener

  @Override
  public void sync (BCSAPI api) throws BCSAPIException
  {
    reset ();
    log.trace ("Sync naddr: " + addresses.size ());
    api.scanTransactionsForAddresses (getAddresses (), UpdateMode.all, getCreated (), new TransactionListener ()
    {
      @Override
      public void process (Transaction t)
      {
        updateWithTransaction (t);
View Full Code Here

Examples of com.sun.sgs.service.TransactionListener

      /*
       * Don't use foreach iteration here, so that we can handle the
       * possibility that a beforeCompletion call adds another listener.
       */
      for (int i = 0; i < listeners.size(); i++) {
    TransactionListener listener = listeners.get(i);
    try {
        listener.beforeCompletion();
    } catch (RuntimeException e) {
        if (logger.isLoggable(Level.FINEST)) {
      logger.logThrow(
          Level.FINEST, e,
          "beforeCompletion {0} listener:{1} failed",
View Full Code Here

Examples of com.sun.sgs.service.TransactionListener

    @Test
    public void testRegisterListenerOtherThread() throws Exception {
  final AtomicReference<RuntimeException> exception =
      new AtomicReference<RuntimeException>(null);
  final TransactionListener listener = new DummyTransactionListener();
  Thread thread = new Thread() {
      public void run() {
    try {
        txn.registerListener(listener);
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.sun.sgs.service.TransactionListener

      /*
       * Don't use foreach iteration here, so that we can handle the
       * possibility that a beforeCompletion call adds another listener.
       */
      for (int i = 0; i < listeners.size(); i++) {
    TransactionListener listener = listeners.get(i);
    try {
                    if (listenerDetailMap != null) {
                        detail = listenerDetailMap.get(listener.getTypeName());
                        startTime = System.currentTimeMillis();
                    }
        listener.beforeCompletion();
                    if (detail != null) {
                        long time = System.currentTimeMillis() - startTime;
                        detail.setCalledBeforeCompletion(false, time);
                    }
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.sun.sgs.service.TransactionListener

      /*
       * Don't use foreach iteration here, so that we can handle the
       * possibility that a beforeCompletion call adds another listener.
       */
      for (int i = 0; i < listeners.size(); i++) {
    TransactionListener listener = listeners.get(i);
    try {
                    if (listenerDetailMap != null) {
                        detail = listenerDetailMap.get(listener.getTypeName());
                        startTime = System.currentTimeMillis();
                    }
        listener.beforeCompletion();
                    if (detail != null) {
                        long time = System.currentTimeMillis() - startTime;
                        detail.setCalledBeforeCompletion(false, time);
                    }
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.vaadin.service.ApplicationContext.TransactionListener

      progressBar.setCaption(i18NSource.getMessage("activity.starting"));
      progressBar.setIndeterminate(true);
      progressBar.setPollingInterval(500);
      processesPopup.addComponent(progressBar);
     
      getApplication().getContext().addTransactionListener(new TransactionListener() {
        private boolean started = false;
        private int counter = 2;

        @Override
        public void transactionStart(Application application, Object transactionData) {
View Full Code Here

Examples of org.activiti.engine.impl.cfg.TransactionListener

 
  protected void hintAsyncExecutor(JobEntity job) { 
    AsyncExecutor asyncExecutor = Context.getProcessEngineConfiguration().getAsyncExecutor();

    // notify job executor:     
    TransactionListener transactionListener = new AsyncJobAddedNotification(job, asyncExecutor);
    Context.getCommandContext()
      .getTransactionContext()
      .addTransactionListener(TransactionState.COMMITTED, transactionListener);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.