org.apache.tomee.common
Class AbstractObjectFactory

java.lang.Object
  extended by org.apache.tomee.common.AbstractObjectFactory
All Implemented Interfaces:
ObjectFactory
Direct Known Subclasses:
EjbFactory, PersistenceContextFactory, PersistenceUnitFactory, ResourceFactory, WsFactory

public abstract class AbstractObjectFactory
extends Object
implements ObjectFactory


Constructor Summary
AbstractObjectFactory()
           
 
Method Summary
protected abstract  String buildJndiName(Reference reference)
           
protected  Context getContext(String jndiProviderId)
           
 Object getObjectInstance(Object object, Name name, Context context, Hashtable environment)
           
protected  Object lookup(String jndiProviderId, String jndiName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractObjectFactory

public AbstractObjectFactory()
Method Detail

getObjectInstance

public Object getObjectInstance(Object object,
                                Name name,
                                Context context,
                                Hashtable environment)
                         throws Exception
Specified by:
getObjectInstance in interface ObjectFactory
Throws:
Exception

buildJndiName

protected abstract String buildJndiName(Reference reference)
                                 throws NamingException
Throws:
NamingException

lookup

protected Object lookup(String jndiProviderId,
                        String jndiName)
                 throws NamingException
Throws:
NamingException

getContext

protected Context getContext(String jndiProviderId)
                      throws NamingException
Throws:
NamingException


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.