Tuscany Core

org.apache.tuscany.core.injection
Class JNDIObjectFactory<T>

java.lang.Object
  extended by org.apache.tuscany.core.injection.JNDIObjectFactory<T>
All Implemented Interfaces:
ObjectFactory<T>

public class JNDIObjectFactory<T>
extends java.lang.Object
implements ObjectFactory<T>

An implementation of ObjectFactory that creates instances by looking them up in a JNDI context.

Version:
$Rev$ $Date$

Constructor Summary
JNDIObjectFactory(javax.naming.Context context, java.lang.String name)
           
 
Method Summary
 T getInstance()
          Return a instance of the type that this factory creates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JNDIObjectFactory

public JNDIObjectFactory(javax.naming.Context context,
                         java.lang.String name)
Method Detail

getInstance

public T getInstance()
              throws ObjectCreationException
Description copied from interface: ObjectFactory
Return a instance of the type that this factory creates.

Specified by:
getInstance in interface ObjectFactory<T>
Returns:
a instance from this factory
Throws:
ObjectCreationException

Tuscany Core

-