Package org.exist.storage.txn

Examples of org.exist.storage.txn.TransactionManager.beginTransaction()


        DBBroker broker = null;
        Collection collection = null;

        TransactionManager txnManager = brokerPool.getTransactionManager();
        Txn txn = txnManager.beginTransaction();

        try {
            broker = brokerPool.get(subject);

            // Check if collection exists. not likely to happen since availability is
View Full Code Here


        TransactionManager transact = null;
        Txn transaction = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            transact = pool.getTransactionManager();
            transaction = transact.beginTransaction();

            checkIndex(broker, docs, "cha", 1);
            checkIndex(broker, docs, "le8", 1);

            XQuery xquery = broker.getXQueryService();
View Full Code Here

    public void testXUpdateUpdate() {
        DBBroker broker = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();

            checkIndex(broker, docs, "cha", 1);
            checkIndex(broker, docs, "le8", 1);

            XQuery xquery = broker.getXQueryService();
View Full Code Here

            vtf.close();
        }

        // Start transaction
        TransactionManager txnManager = brokerPool.getTransactionManager();
        Txn txn = txnManager.beginTransaction();

        try {
            broker = brokerPool.get(subject);

            // Check if collection exists. not likely to happen since availability is checked
View Full Code Here

    public void testXUpdateReplace() {
        DBBroker broker = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();

            checkIndex(broker, docs, "cha", 1);
            checkIndex(broker, docs, "le8", 1);

            XQuery xquery = broker.getXQueryService();
View Full Code Here

    public void testXUpdateRename() {
        DBBroker broker = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();

            checkIndex(broker, docs, "cha", 1);
            checkIndex(broker, docs, "le8", 1);

            XQuery xquery = broker.getXQueryService();
View Full Code Here

    public void testReindex() {
        DBBroker broker = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();

            //Doh ! This reindexes *all* the collections for *every* index
            broker.reindexCollection(XmldbURI.xmldbUriFor("/db"));

            checkIndex(broker, docs, "cha", 1);
View Full Code Here

        Collection srcCollection = null;
        Collection destCollection = null;


        TransactionManager txnManager = brokerPool.getTransactionManager();
        Txn txn = txnManager.beginTransaction();

        try {
            broker = brokerPool.get(subject);

            // This class contains already the URI of the resource that shall be moved/copied
View Full Code Here

    public void testDropIndex() {
        DBBroker broker = null;
        try {
          broker = pool.get(pool.getSecurityManager().getSystemSubject());
            TransactionManager transact = pool.getTransactionManager();
            Txn transaction = transact.beginTransaction();

            XQuery xquery = broker.getXQueryService();
            assertNotNull(xquery);
            Sequence seq = xquery.execute("//item[ngram:contains(., 'cha')]", null, AccessContext.TEST);
            assertNotNull(seq);
View Full Code Here

          assertNotNull(pool);
            broker = pool.get(pool.getSecurityManager().getSystemSubject());
            assertNotNull(broker);
            transact = pool.getTransactionManager();
            assertNotNull(transact);
            transaction = transact.beginTransaction();
            assertNotNull(transaction);
            System.out.println("Transaction started ...");

            Collection root = broker.getOrCreateCollection(transaction, TestConstants.TEST_COLLECTION_URI);
            assertNotNull(root);
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.