Package org.mom4j.mstore

Examples of org.mom4j.mstore.LockException


        String name = (String)handle.getKey();
       
        TxCtx ctx = (TxCtx)this.ctxMap.get(sessionId);
        if(ctx == null) {
            throw new LockException("no transaction");
        }

        File f   = new File(this.store.getAbsolutePath() + DELIM + name);
        File txF = new File(f.getAbsolutePath() + TX);
        if(!f.exists()) {
            if(!ctx.locked.contains(txF))
                throw new LockException(name + " does not exist or locked by another tx");
        } else {
            if(f.renameTo(txF)) {
                ctx.lock(txF);
            } else {
                throw new LockException(name + " could not be locked");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.mom4j.mstore.LockException

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.