org.openxava.ejbx
Class JndiContext

java.lang.Object
  extended by org.openxava.ejbx.JndiContext
All Implemented Interfaces:
IContext

public class JndiContext
extends java.lang.Object
implements IContext

Adapter from a JNDI context to a IContext. If the JNDI name starts with @subcontext@ ignores this word.

Author:
Javier Paniza

Constructor Summary
JndiContext(javax.naming.Context ctx)
          It's created from JNDI context that it wants wrap.
 
Method Summary
 void close()
           
 java.lang.Object lookup(java.lang.String name)
          Look a resource from its name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiContext

public JndiContext(javax.naming.Context ctx)
It's created from JNDI context that it wants wrap. Preconditions:
  • ctx != null

Method Detail

lookup

public java.lang.Object lookup(java.lang.String name)
                        throws javax.naming.NamingException
Description copied from interface: IContext
Look a resource from its name.
The returned object can be of any type.

Specified by:
lookup in interface IContext
Throws:
javax.naming.NamingException

close

public void close()
           throws javax.naming.NamingException
Specified by:
close in interface IContext
Throws:
javax.naming.NamingException