Examples of TransactionTask


Examples of com.totsp.gwittir.client.util.html5db.TransactionTask

  @Override
  public void storeWindowContextData(
      final Map<String, String> windowContextData) {
                db.run(
                        new TransactionTask() {

                            public void run(Transaction tx) {
                               tx.execute("DELETE FROM windowcontext ", new String[0], new ResultsCallback(){

                                public void onSuccess(Transaction tx, ResultSet rs) {
View Full Code Here

Examples of com.totsp.gwittir.client.util.html5db.TransactionTask

  @Override
  public void init(final WindowContextCallback listener) {

    db = Databases.openDatabase("gwittir-windowcontext", "1.0",
        "This gwittir window context database", QUOTA);
    db.run(new TransactionTask() {
      public void run(Transaction tx) {
        tx.execute("SELECT COUNT(*) FROM windowcontext", null,
            new ResultsCallback() {
              public void onSuccess(Transaction tx, ResultSet rs) {
                                                                GWT.log("windowcontext found", null);
View Full Code Here

Examples of com.totsp.gwittir.client.util.html5db.TransactionTask

*/
public class DBTest {
    public static void doInsert() {
        Database db = Databases.openDatabase("gwittir-windowcontext", "1.0",
                "This is the gwittir test db", 512000);
        db.run(new TransactionTask() {
                public void run(Transaction tx) {
                    tx.execute("SELECT COUNT(*) FROM Gwittir", null,
                        new ResultsCallback() {
                            public void onSuccess(Transaction tx, ResultSet rs) {
                                Window.alert("Worked!");
View Full Code Here

Examples of com.totsp.gwittir.client.util.html5db.TransactionTask

  }

  @Override
  public void storeWindowContextData(
      final Map<String, String> windowContextData) {
    db.run(new TransactionTask() {
      public void run(Transaction tx) {
        for (Entry<String, String> entry : windowContextData.entrySet()) {
          tx
              .execute(
                  "INSERT INTO windowcontext (key, value) VALUES ( ?, ? )",
View Full Code Here

Examples of com.totsp.gwittir.client.util.html5db.TransactionTask

  @Override
  public void init(final WindowContextCallback listener) {

    db = Databases.openDatabase("gwittir-windowcontext", "1.0",
        "This gwittir window context database", QUOTA);
    db.run(new TransactionTask() {
      public void run(Transaction tx) {
        tx.execute("SELECT COUNT(*) FROM windowcontext", null,
            new ResultsCallback() {
              public void onSuccess(Transaction tx, ResultSet rs) {
                tx.execute(
View Full Code Here

Examples of org.activemq.service.TransactionTask

            doAdvisoryDispatchMessage(pointer);
        }
        else {           
            messageStore.addMessage(message);           
            // If there is no transaction.. then this executes directly.
            TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    queue.enqueue(pointer);
                    checkRunning();
                }
            });           
View Full Code Here

Examples of org.activemq.service.TransactionTask

            // note that we still need to persist the message even if there are no matching
            // subscribers as they may come along later
            // plus we don't pre-load subscription information               
            final MessageContainer container = getContainer(dest.getPhysicalName());
            container.addMessage(message);
            TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask() {
                public void execute() throws Throwable {
                    doSendMessage(client, message, container);
                }
            });
        }
View Full Code Here

Examples of org.activemq.service.TransactionTask

            doAdvisoryDispatchMessage(pointer);
        }
        else {           
            messageStore.addMessage(message);           
            // If there is no transaction.. then this executes directly.
            TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    queue.enqueue(pointer);
                    checkRunning();
                }
            });           
View Full Code Here

Examples of org.activemq.service.TransactionTask

                        pointer.setRedelivered(true);
                    }
                    else {
                        unconsumedMessagesDispatched.decrement();
                        // We may have to undo the delivery..
                        TransactionManager.getContexTransaction().addPostRollbackTask(new TransactionTask() {
                            public void execute() throws Throwable {
                                unconsumedMessagesDispatched.increment();
                                pointer.reset();
                                pointer.setRedelivered(true);
                                dispatch.wakeup(SubscriptionImpl.this);
                            }
                        });
                        final QueueListEntry theEntry = entry;
                        TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask() {
                            public void execute() throws Throwable {
                                messagePtrs.remove(theEntry);
                                if ((ack.isExpired() || ack.isMessageRead()) && !browser) {
                                    if (ack.isExpired() && !pointer.getContainer().isDeadLetterQueue()) {
                                        ActiveMQMessage msg = pointer.getContainer().getMessage(
View Full Code Here

Examples of org.activemq.service.TransactionTask

        ActiveMQDestination destination = message.getJMSActiveMQDestination();
        if ( !destination.isQueue() || !message.isTemporary() )
            return;

        // If there is no transaction.. then this executes directly.
        TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
            public void execute() throws Throwable {
                doSendMessage(client, message);
            }
        });
    }
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.