public interface WsnBatchModeContext
extends javax.naming.Context
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.
WsnOptimizedJndiContext
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.
|
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
WsnBatchCompleteResults executeBatchedOperations() throws javax.naming.NamingException
javax.naming.NamingException
- Some JNDI exception occurred.WsnBatchCompleteResults
javax.naming.Context getNonBatchModeContext() throws javax.naming.NamingException
javax.naming.NamingException
- Some JNDI exception occurred.