Package org.apache.lenya.transaction

Examples of org.apache.lenya.transaction.TransactionException


    /**
     * @see org.apache.lenya.transaction.Transactionable#lock()
     */
    public void lock() throws TransactionException {
        if (isCheckedOut()) {
            throw new TransactionException("Cannot lock [" + this + "]: node is checked out.");
        }
        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Locking [" + this + "]");
        }
        int currentVersion;
        try {
            currentVersion = getRevisionController().getLatestVersion(getRCPath());
        } catch (TransactionException e) {
            throw e;
        } catch (Exception e) {
            throw new TransactionException(e);
        }
        this.lock = new Lock(currentVersion);
    }
View Full Code Here


                }

                this.data = out.toByteArray();
            }
        } catch (Exception e) {
            throw new TransactionException(e);
        } finally {
            try {
                if (in != null)
                    in.close();
                if (out != null)
                    out.close();
            } catch (Exception e) {
                throw new TransactionException(e);
            }

            if (resolver != null) {
                if (source != null) {
                    resolver.release(source);
View Full Code Here

            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI(getRealSourceURI());
            if (source.exists()) {
                return source.getLastModified();
            } else {
                throw new TransactionException("The source [" + getRealSourceURI()
                        + "] does not exist!");
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.lenya.transaction.TransactionException

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.