Class RepositoryFactoryImpl

  extended by org.apache.jackrabbit.core.jndi.RepositoryFactoryImpl
All Implemented Interfaces:

public class RepositoryFactoryImpl
extends Object
implements RepositoryFactory

RepositoryFactoryImpl implements a repository factory that obtains a repository instance through JNDI.

This implementation does not support the notion of a default repository.

Field Summary
          The name of the JNDI name property.
Constructor Summary
Method Summary
 Repository getRepository(Map parameters)
          Attempts to establish a connection to a repository using the given parameters.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final String REPOSITORY_JNDI_NAME
The name of the JNDI name property.

See Also:
Constant Field Values
Constructor Detail


public RepositoryFactoryImpl()
Method Detail


public Repository getRepository(Map parameters)
                         throws RepositoryException
Description copied from interface: RepositoryFactory
Attempts to establish a connection to a repository using the given parameters.

Parameters are passed in a Map of String key/value pairs. The keys are not specified by JCR and are implementation specific. However, vendors should use keys that are namespace qualified in the Java package style to distinguish their key names. For example an address parameter might be com.vendor.address.

The implementation must return null if it does not understand the given parameters. The implementation may also return null if a default repository instance is requested (indicated by null parameters) and this factory is not able to identify a default repository. An implementation should throw an RepositoryException if it is the right factory but has trouble connecting to the repository.

An implementation of this method must be thread-safe.

Specified by:
getRepository in interface RepositoryFactory
parameters - map of arbitrary string key/value pairs as repository arguments or null if none are provided and a client wishes to connect to a default repository.
a repository instance or null if this implementation does not understand the passed parameters.
RepositoryException - if getRepository fails or if no suitable repository is found.

Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.