com.ibm.websphere.naming
Interface WsnOptimizedJndiContext


public interface WsnOptimizedJndiContext

This interface is used to access JNDI Context optimizations implemented in WebSphere Application Server. Current optimizations include batching JNDI operations to the name server. Instances of javax.naming.Context returned from JNDI lookup operations will implement this interface if the WebSphere Application Server initial context factory, com.ibm.websphere.naming.WsnInitialContextFactory, is used to get the initial context, and if the lookup name is not a URL, such as "java:comp/env".


Method Summary
 WsnBatchModeContext getBatchModeContext()
          Returns the WsnBatchModeContext implementation of the current context.
 boolean isLocal()
          Tests whether name server calls are local or remote.
 boolean supportsBatchMode()
          Used to indicate if this context provides support for batch mode.
 

Method Detail

supportsBatchMode

public boolean supportsBatchMode()
Used to indicate if this context provides support for batch mode. If batching is not supported, a call to getBatchModeContext() will fail.

Returns:
  • true - if this Context supports batch mode
  • false - if this Context does not support batch mode

  • getBatchModeContext

    public WsnBatchModeContext getBatchModeContext()
                                            throws javax.naming.NamingException
    Returns the WsnBatchModeContext implementation of the current context.

    Returns:
    the newly cloned context.
    Throws:
    javax.naming.NamingException - If the target name server for this context doesn't support batch mode, or if the context object itself cannot be cloned as a WsnBatchModeContext.

    isLocal

    public boolean isLocal()
    Tests whether name server calls are local or remote. If true is returned, name server calls are local and it is more efficient NOT to use batch mode processing.

    Returns:
    true if name server calls are local calls, false if name server calls are remote calls. For best performance, do NOT use batch mode if the name server is LOCAL.


     

    WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

     

    IBM is a trademark of the IBM Corporation in the United States, other countries, or both.