Package org.apache.jackrabbit.core.state

Examples of org.apache.jackrabbit.core.state.DefaultISMLocking$XidRWLock


            public ISMLocking getISMLocking() throws RepositoryException {
                Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
                if (element != null) {
                    return parseBeanConfig(element).newInstance(ISMLocking.class);
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here


* Tests the DefaultISMLocking class.
*/
public class DefaultISMLockingDeadlockTest extends JUnitTest {

    public void test() throws InterruptedException {
        final ISMLocking lock = new DefaultISMLocking();
        WriteLock w1 = lock.acquireWriteLock(null);
        ReadLock r1 = w1.downgrade();
        final InterruptedException[] ex = new InterruptedException[1];
        Thread thread = new Thread() {
            public void run() {
                try {
                    lock.acquireWriteLock(null).release();
                } catch (InterruptedException e) {
                    ex[0] = e;
                }
            }
        };
        thread.start();
        Thread.sleep(100);
        lock.acquireReadLock(null).release();
        r1.release();
        thread.join();
        if (ex[0] != null) {
            throw ex[0];
        }
View Full Code Here

            public ISMLocking getISMLocking() throws RepositoryException {
                Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
                if (element != null) {
                    return parseBeanConfig(element).newInstance(ISMLocking.class);
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

                        throw new RepositoryException(
                                "Invalid ISMLocking class: "
                                + config.getClassName(), e);
                    }
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

            public ISMLocking getISMLocking() throws RepositoryException {
                Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
                if (element != null) {
                    return parseBeanConfig(element).newInstance(ISMLocking.class);
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

            public ISMLocking getISMLocking() throws RepositoryException {
                Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
                if (element != null) {
                    return parseBeanConfig(element).newInstance(ISMLocking.class);
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

                        throw new RepositoryException(
                                "Invalid ISMLocking class: "
                                + config.getClassName(), e);
                    }
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

            public ISMLocking getISMLocking() throws RepositoryException {
                Element element = getElement(parent, ISM_LOCKING_ELEMENT, false);
                if (element != null) {
                    return parseBeanConfig(element).newInstance(ISMLocking.class);
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

                        throw new RepositoryException(
                                "Invalid ISMLocking class: "
                                + config.getClassName(), e);
                    }
                } else {
                    return new DefaultISMLocking();
                }
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.state.DefaultISMLocking$XidRWLock

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.