Examples of doSomethingGood()


Examples of org.apache.felix.ipojo.transaction.test.service.CheckService.doSomethingGood()

        osgi.waitForService(TransactionManager.class.getName(), null, 5000);
        CheckService cs = (CheckService) osgi.getServiceObject(ref);
        TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null);
        tm.begin();
        Transaction t = tm.getTransaction();
        cs.doSomethingGood();
        Transaction t2 = cs.getCurrentTransaction();
        Assert.assertSame(t2, t);
        t.commit();

        Assert.assertNull(cs.getLastRolledBack());
View Full Code Here

Examples of org.apache.felix.ipojo.transaction.test.service.CheckService.doSomethingGood()

        osgi.waitForService(TransactionManager.class.getName(), null, 5000);
        CheckService cs = (CheckService) osgi.getServiceObject(ref);
        TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null);
        tm.begin();
        Transaction t = tm.getTransaction();
        cs.doSomethingGood();
        Transaction t2 = cs.getCurrentTransaction();
        Assert.assertNotSame(t2, t); // Two different transactions
        // Check that t2 is commited => no transaction
        Assert.assertEquals(Status.STATUS_NO_TRANSACTION, t2.getStatus());
        t.commit();
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.