org.apache.jackrabbit.commons.repository
Class JNDIRepositoryFactory

java.lang.Object
  extended by org.apache.jackrabbit.commons.repository.JNDIRepositoryFactory
All Implemented Interfaces:
RepositoryFactory

public class JNDIRepositoryFactory
extends Object
implements RepositoryFactory

Factory that looks up a repository from JNDI.

Since:
1.4

Constructor Summary
JNDIRepositoryFactory(Context context, String name)
          Creates a factory for looking up a repository from JNDI.
 
Method Summary
 Repository getRepository()
          Looks up and returns the configured repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIRepositoryFactory

public JNDIRepositoryFactory(Context context,
                             String name)
Creates a factory for looking up a repository from JNDI.

Parameters:
context - JNDI context
name - JNDI name of the repository
Method Detail

getRepository

public Repository getRepository()
                         throws RepositoryException
Looks up and returns the configured repository.

Specified by:
getRepository in interface RepositoryFactory
Returns:
repository instance
Throws:
RepositoryException - if the repository can not be found


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