com.ibm.websphere.naming

Interface WsnBatchModeContext

  • All Superinterfaces:
    javax.naming.Context


    public interface WsnBatchModeContext
    extends javax.naming.Context
    This interface is a javax.naming.Context extension to provide batch mode processing capabilities. JNDI operations performed with a "batch mode context" are not sent to the name server until the executeBatchedOperations() method is invoked. Batch mode contexts can be used to batch operations to the name server for greater performance since fewer remote calls to the name server will be made.

    When a JNDI lookup from the name server returns a javax.naming.Context object (when WebSphere's initial context factory, com.ibm.websphere.naming.WsnInitialContextFactory, is used to obtain the initial context), the context object is not a batch mode context. However, a batch mode version of the context can be obtained. To obtain a batch mode version of the context, cast the Context instance to the interface com.ibm.websphere.naming.WsnOptimizedJndiContext and invoke the method, getBatchModeContext(). The returned value will be an instance of com.ibm.websphere.naming.WsnBatchModeContext. Take care to not attempt the cast on the initial context instance itself, or on contexts returned from URL lookups such as "java:comp/env". To obtain a WebSphere implementation of javax.naming.Context for the initial context, execute a lookup on the initial context with an empty name. For example,

     Context ctx = (Context) initialContext.lookup("");
     

    Batching is supported only if the name server is a WebSphere Application Server implementation.

    See Also:
    WsnOptimizedJndiContext
    • Field Summary

      • Fields inherited from interface javax.naming.Context

        APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      WsnBatchCompleteResults executeBatchedOperations()
      Sends the accumulated batched operations to the server for execution and returns the results in a WsnBatchCompleteResults instance.
      javax.naming.Context getNonBatchModeContext()
      Creates a non batch mode javax.naming.Context instance which is otherwise a clone of this Context instance.
      • Methods inherited from interface javax.naming.Context

        addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
    • Method Detail

      • executeBatchedOperations

        WsnBatchCompleteResults executeBatchedOperations()
                                                         throws javax.naming.NamingException
        Sends the accumulated batched operations to the server for execution and returns the results in a WsnBatchCompleteResults instance.
        Returns:
        a WsnBatchCompleteResults which will consist of one WsnBatchResult object for each batch operation requested.
        Throws:
        javax.naming.NamingException - Some JNDI exception occurred.
        See Also:
        WsnBatchCompleteResults
      • getNonBatchModeContext

        javax.naming.Context getNonBatchModeContext()
                                                    throws javax.naming.NamingException
        Creates a non batch mode javax.naming.Context instance which is otherwise a clone of this Context instance.
        Returns:
        a non batch mode context clone.
        Throws:
        javax.naming.NamingException - Some JNDI exception occurred.
IBM WebSphere Application ServerTM
Release 8.5