Package org.exist.storage.txn

Examples of org.exist.storage.txn.Txn


            } catch (final EXistException e) {
                return false;
            }
   
            tm = db.getTransactionManager();
            Txn transaction = null;
   
            org.exist.collections.Collection destination = null;
            org.exist.collections.Collection source = null;
            XmldbURI newName;
            try {
View Full Code Here


        {throw new IOException();}
     
        DBBroker broker = null;
        BrokerPool db = null;
        TransactionManager tm = null;
        Txn txn = null;

        try {
            try {
                db = BrokerPool.getInstance();
                broker = db.get(null);
View Full Code Here

      } catch (final EXistException e) {
        return false;
      }
 
      tm = db.getTransactionManager();
          Txn txn = null;
          try {
              collection = broker.openCollection(uri.removeLastSegment(), Lock.NO_LOCK);
              if (collection == null) {
                  return false;
              }
View Full Code Here

      if (mimeType == null) {
        mimeType = MimeType.BINARY_TYPE;
      }
     
      tm = db.getTransactionManager();
      final Txn transaction = tm.beginTransaction();
 
      InputStream is = null;
      try {
        if (mimeType.isXMLType()) {
          // store as xml resource
View Full Code Here

      } catch (final EXistException e) {
        throw new IOException(e);
      }
 
      final TransactionManager tm = db.getTransactionManager();
      Txn txn = null;
     
      try {
        //collection
        if (uri.endsWith("/")) {
          collection = broker.getCollection(uri);
View Full Code Here

       
        if (!(file.exists() && file.canRead()))
            return;
       
        TransactionManager txManager = db.getTransactionManager();
        Txn txn = null;
        try {
            MimeType mime = getMimeTable().getContentTypeFor( file.getName() );
            if (mime != null && mime.isXMLType()) {
                txn = txManager.beginTransaction();
View Full Code Here

    }
    public boolean createCollection(java.lang.String sessionId, XmldbURI path) throws java.rmi.RemoteException {
        final Session session = getSession(sessionId);
        DBBroker broker = null;
        final TransactionManager transact = pool.getTransactionManager();
        final Txn txn = transact.beginTransaction();
        try {
            broker = pool.get(session.getUser());
            LOG.debug("creating collection " + path);
            final org.exist.collections.Collection coll =
                    broker.getOrCreateCollection(txn, path);
View Full Code Here

    }
    public boolean removeCollection(java.lang.String sessionId, XmldbURI path) throws java.rmi.RemoteException {
        final Session session = getSession(sessionId);
        DBBroker broker = null;
        final TransactionManager transact = pool.getTransactionManager();
        final Txn txn = transact.beginTransaction();
        try {
            broker = pool.get(session.getUser());
            final Collection collection = broker.getCollection(path);
            if(collection == null) {
                transact.abort(txn);
View Full Code Here

    }
    public boolean removeDocument(java.lang.String sessionId, XmldbURI path) throws java.rmi.RemoteException {
        final Session session = getSession(sessionId);
        DBBroker broker = null;
        final TransactionManager transact = pool.getTransactionManager();
        final Txn txn = transact.beginTransaction();
        try {
            broker = pool.get(session.getUser());
            final XmldbURI collectionUri = path.removeLastSegment();
            final XmldbURI docUri = path.lastSegment();
            if (collectionUri==null || docUri==null) {
View Full Code Here

    }
    public void store(java.lang.String sessionId, byte[] data, java.lang.String encoding, XmldbURI path, boolean replace) throws java.rmi.RemoteException {
        final Session session = getSession(sessionId);
        DBBroker broker = null;
        final TransactionManager transact = pool.getTransactionManager();
        final Txn txn = transact.beginTransaction();
        try {
            broker = pool.get(session.getUser());
            final XmldbURI collectionUri = path.removeLastSegment();
            final XmldbURI docUri = path.lastSegment();
            if (collectionUri==null || docUri==null) {
View Full Code Here

TOP

Related Classes of org.exist.storage.txn.Txn

Copyright © 2018 www.massapicom. 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.