org.apache.ojb.broker.core
Class NamingLocator

java.lang.Object
  extended by org.apache.ojb.broker.core.NamingLocator

public class NamingLocator
extends Object

Encapsulates a reference to the JNDI Naming context.

Version:
$Id: NamingLocator.java,v 1.1 2007-08-24 22:17:35 ewestfal Exp $
Author:
Thomas Mahler

Constructor Summary
NamingLocator()
           
 
Method Summary
static Context getContext()
          Returns the naming context.
static Object lookup(String jndiName)
          Lookup an object instance from JNDI context.
static void refresh()
          Refresh the used InitialContext instance.
static void setContext(Properties properties)
          Set the used InitialContext.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamingLocator

public NamingLocator()
Method Detail

getContext

public static Context getContext()
Returns the naming context.


lookup

public static Object lookup(String jndiName)
Lookup an object instance from JNDI context.

Parameters:
jndiName - JNDI lookup name
Returns:
Matching object or null if none found.

refresh

public static void refresh()
Refresh the used InitialContext instance.


setContext

public static void setContext(Properties properties)
                       throws NamingException
Set the used InitialContext. If properties argument is null, the default initial context was used.

Parameters:
properties - The properties used for context instantiation - the properties are: Context.INITIAL_CONTEXT_FACTORY, Context.PROVIDER_URL, Context.URL_PKG_PREFIXES
Throws:
NamingException


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.