Examples of ObservationListenerSupport


Examples of org.apache.sling.jcr.resource.internal.ObservationListenerSupport

                   log.error("Detected Oak based repository but no executor service available! Unable to use improved JCR Resource listener");
                }
            }
        }
        final String root = PropertiesUtil.toString(context.getProperties().get(ResourceProvider.ROOTS), "/");
        final ObservationListenerSupport support = new ObservationListenerSupport(context.getBundleContext(), repository);
        boolean closeSupport = true;
        try {
            if ( isOak ) {
                try {
                    this.listener = new OakResourceListener(root, support, context.getBundleContext(), executor);
                    log.info("Detected Oak based repository. Using improved JCR Resource Listener");
                } catch ( final RepositoryException re ) {
                    throw re;
                } catch ( final Throwable t ) {
                    log.error("Unable to instantiate improved JCR Resource listener for Oak. Using fallback.", t);
                }
            }
            if ( this.listener == null ) {
                this.listener = new JcrResourceListener(root, support);
            }
            closeSupport = false;
        } finally {
            if ( closeSupport ) {
                support.dispose();
            }
        }
    }
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.