org.guiceyfruit.jndi
Class GuiceInitialContextFactory

java.lang.Object
  extended by org.guiceyfruit.jndi.GuiceInitialContextFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory

public class GuiceInitialContextFactory
extends java.lang.Object
implements javax.naming.spi.InitialContextFactory

A factory of the Guice JNDI provider which creates an injector from all the available modules specified in the space separated Injectors.MODULE_CLASS_NAMES property.

For more details of how this JNDI provider works see the wiki documentation

Version:
$Revision: 656978 $

Field Summary
static java.lang.String NAME_PREFIX
           
 
Constructor Summary
GuiceInitialContextFactory()
           
 
Method Summary
 javax.naming.Context getInitialContext(java.util.Hashtable environment)
          Creates a new context with the given environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_PREFIX

public static final java.lang.String NAME_PREFIX
See Also:
Constant Field Values
Constructor Detail

GuiceInitialContextFactory

public GuiceInitialContextFactory()
Method Detail

getInitialContext

public javax.naming.Context getInitialContext(java.util.Hashtable environment)
                                       throws javax.naming.NamingException
Creates a new context with the given environment.

Specified by:
getInitialContext in interface javax.naming.spi.InitialContextFactory
Parameters:
environment - the environment, must not be null
Returns:
the created context.
Throws:
javax.naming.NamingException - is thrown if creation failed.


Copyright © 2011. All Rights Reserved.