org.apache.jackrabbit.jcr2spi
Class RepositoryImpl.Factory

java.lang.Object
  extended by org.apache.jackrabbit.jcr2spi.RepositoryImpl.Factory
All Implemented Interfaces:
javax.naming.spi.ObjectFactory
Enclosing class:
RepositoryImpl

public static class RepositoryImpl.Factory
extends java.lang.Object
implements javax.naming.spi.ObjectFactory

Implementation of ObjectFactory for repository instances.

Works by creating a Reference to a RepositoryConfig instance based on the information obtained from the RepositoryImpl's Reference.

Address Types:

RCF
Class name for ObjectFactory creating instances of RepositoryConfig
RCC
Class name for RepositoryConfig instances

All other types are copied over verbatim to the new Reference.

A sample JNDI configuration inside a servlet container's server.xml:

   <Resource
         name="jcr/repositoryname"
         auth="Container"
         type="org.apache.jackrabbit.jcr2spi.RepositoryImpl"
         factory="org.apache.jackrabbit.jcr2spi.RepositoryImpl$Factory"
         org.apache.jackrabbit.jcr2spi.RepositoryImpl.factory="class name of ObjectFactory for RepositoryConfig instances"
         org.apache.jackrabbit.jcr2spi.RepositoryImpl.class="class name of RepositoryConfig implementation class"
         ...additional properties passed to the ObjectFactory...
   />
 


Field Summary
static java.lang.String RCC
           
static java.lang.String RCF
           
 
Constructor Summary
RepositoryImpl.Factory()
           
 
Method Summary
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable<?,?> environment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCF

public static final java.lang.String RCF

RCC

public static final java.lang.String RCC
Constructor Detail

RepositoryImpl.Factory

public RepositoryImpl.Factory()
Method Detail

getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable<?,?> environment)
                                   throws java.lang.Exception
Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception


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