Class JndiRepositoryFactory

  • All Implemented Interfaces:
    javax.jcr.RepositoryFactory
    Direct Known Subclasses:
    GenericRepositoryFactory

    public class JndiRepositoryFactory
    extends java.lang.Object
    implements javax.jcr.RepositoryFactory
    JNDI-based JCR repository factory. This factory looks up Repository instances from JNDI directories based on the following parameters:
    org.apache.jackrabbit.repository.jndi.name
    The value of this parameter is used as a JNDI name for looking up the repository.
    org.apache.jackrabbit.repository.uri
    If the URI scheme is "jndi", then the remainder of the URI is used as a JNDI name for looking up the repository.

    All the other repository parameters are passed as the environment of the initial JNDI context.

    Clients should normally only use this class through the Java Service Provider mechanism. See the getRepository utility methods in JcrUtils for an easy way to do that.

    Since:
    Apache Jackrabbit 2.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String JNDI_NAME
      The JNDI name parameter name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.jcr.Repository getRepository​(java.util.Map parameters)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JNDI_NAME

        public static final java.lang.String JNDI_NAME
        The JNDI name parameter name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JndiRepositoryFactory

        public JndiRepositoryFactory()
    • Method Detail

      • getRepository

        public javax.jcr.Repository getRepository​(java.util.Map parameters)
                                           throws javax.jcr.RepositoryException
        Specified by:
        getRepository in interface javax.jcr.RepositoryFactory
        Throws:
        javax.jcr.RepositoryException