Package net.jini.core.transaction

Examples of net.jini.core.transaction.Transaction.commit()


        if (lease.getExpiration() > gotER0Timestamp + leaseForeverTime) {
            throw new TestException(
                    "Lease for EventRegistration expires later than expected");
        }

        txn.commit();

        /*
         * After transaction commited the appropriate event registrations
         * (all in this case) are dropped.
         * Therefore it is assumed that no more notifications will be
View Full Code Here


                    new MarshalledObject("notUsedHere"));
            throw new TestException("NullPointerException is not thrown "
                                    + "when listener is null");
        } catch (NullPointerException e) {}

        txn.commit();

        /*
         * Transaction txn is not null and is not usable by the space.
         * templates is not empty
         */
 
View Full Code Here

        templates.add((SimpleEntry) sampleEntry1.clone());
        expectedResult.add(sampleEntry1);
        Transaction txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking one entry");
        txn.commit();
        reset();

        templates.add((SimpleEntry) sampleEntry1.clone());
        templates.add((SimpleEntry) sampleEntry2.clone());
        expectedResult.add(sampleEntry1);
View Full Code Here

        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry2);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking two entries");
        txn.commit();
        reset();

        templates.add(new SimpleEntry("TestEntry #1", null));
        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry3);
View Full Code Here

        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry3);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking two entries with one template");
        txn.commit();
        reset();

        templates.add(new SimpleEntry(null, 2));
        expectedResult.add(sampleEntry2);
        expectedResult.add(sampleEntry3);
View Full Code Here

        expectedResult.add(sampleEntry2);
        expectedResult.add(sampleEntry3);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking two entries with one template: test2");
        txn.commit();
        reset();

        templates.add(new SimpleEntry(null, null));
        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry2);
View Full Code Here

        expectedResult.add(sampleEntry2);
        expectedResult.add(sampleEntry3);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking three entries with one template");
        txn.commit();
        reset();

        space.write(sampleEntry1, null, leaseForeverTime);

        // now the space contains two copies of sampleEntry1
View Full Code Here

        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry1);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking duplicate entries");
        txn.commit();
        reset();

        templates.add(null);
        expectedResult.add(sampleEntry1);
        expectedResult.add(sampleEntry2);
View Full Code Here

        expectedResult.add(sampleEntry2);
        expectedResult.add(sampleEntry3);
        txn = getTransaction();
        testTemplates(templates, txn, timeout1, MAX_ENTRIES, expectedResult,
                      "Taking entries with null template");
        txn.commit();
        reset();

        // no such entry in the space
        SimpleEntry unavailableEntry = new SimpleEntry("TestEntry #1", 3);
View Full Code Here

        // expected result is empty
        txn = getTransaction();
        testTemplates(templates, txn, checkTime, MAX_ENTRIES, expectedResult,
                      "Taking with wrong template");
        txn.commit();
        reset();

        ArrayList entriesToAdd = new ArrayList();
        ArrayList leasesToAdd = new ArrayList();
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.