org.jboss.soa.esb.helpers
Class NamingContext

java.lang.Object
  extended by org.jboss.soa.esb.helpers.NamingContext

public class NamingContext
extends java.lang.Object

Obtains JNDI naming context.


Field Summary
static java.lang.String JBOSS_INITIAL_CONTEXT_FACTORY
           
static java.lang.String JBOSS_PROVIDER_URL
           
static java.lang.String JBOSS_URL_PKG_PREFIX
           
static int MAX_RETRIES
           
 
Constructor Summary
NamingContext()
           
 
Method Summary
static void closeAllContexts()
          Closes all Contexts, and removes them from the contextCache.
static javax.naming.Context getFreshServerContext(java.util.Properties properties)
          Refreshing the cached JNDI context, return the new context.
static javax.naming.Context getServerContext(java.util.Properties properties)
          Tries to connect to the server to obtain the server Context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_RETRIES

public static final int MAX_RETRIES
See Also:
Constant Field Values

JBOSS_PROVIDER_URL

public static final java.lang.String JBOSS_PROVIDER_URL
See Also:
Constant Field Values

JBOSS_INITIAL_CONTEXT_FACTORY

public static final java.lang.String JBOSS_INITIAL_CONTEXT_FACTORY
See Also:
Constant Field Values

JBOSS_URL_PKG_PREFIX

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

NamingContext

public NamingContext()
Method Detail

getServerContext

public static javax.naming.Context getServerContext(java.util.Properties properties)
Tries to connect to the server to obtain the server Context.

Parameters:
properties - - the JNDI environment.
Returns:
the InitialContext.

getFreshServerContext

public static javax.naming.Context getFreshServerContext(java.util.Properties properties)
Refreshing the cached JNDI context, return the new context.

Parameters:
properties -
Returns:

closeAllContexts

public static void closeAllContexts()
Closes all Contexts, and removes them from the contextCache.