org.apache.ojb.broker.core
Class NamingLocator

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

public class NamingLocator
extends java.lang.Object

Encapsulates a reference to the JNDI Naming context.

Version:
$Id: NamingLocator.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Thomas Mahler

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

Constructor Detail

NamingLocator

public NamingLocator()
Method Detail

getContext

public static javax.naming.Context getContext()
Returns the naming context.


lookup

public static java.lang.Object lookup(java.lang.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(java.util.Properties properties)
                       throws javax.naming.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:
javax.naming.NamingException


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30