org.controlhaus.jndi
Interface JndiControl


public interface JndiControl

The Jndi Control encapsulates access to the JNDI context. It provides annotation for setting the factory and provider URL.


Nested Class Summary
static interface JndiControl.Properties
           
 
Method Summary
 InitialContext getInitialContext()
          Get the JNDI initial context.
 Object getResource(String resource, Class resourceClass)
          Get a JNDI based resource.
 

Method Detail

getResource

Object getResource(String resource,
                   Class resourceClass)
                   throws ControlException
Get a JNDI based resource.

Parameters:
resource - the resource name.
resourceClass - the resource class.
Returns:
the resource object.
Throws:
ControlException

getInitialContext

InitialContext getInitialContext()
                                 throws ControlException
Get the JNDI initial context.

Returns:
the initial context.
Throws:
ControlException