@Contract
public interface GlassfishNamingManager
| Modifier and Type | Field and Description |
|---|---|
static String |
LOGICAL_NAME |
static String |
NAMESPACE_METADATA_KEY |
| Modifier and Type | Method and Description |
|---|---|
void |
bindToAppNamespace(String appName,
Collection<? extends JNDIBinding> bindings)
Binds the bindings to module namespace of an application
Typically, to get access to application's namespace, invocation context must be set to appropriate application's context. This API is useful in cases where containers within GlassFish need to bind the objects in application's name-space and do not have application's invocation context |
void |
bindToComponentNamespace(String appName,
String moduleName,
String componentId,
boolean treatComponentAsModule,
Collection<? extends JNDIBinding> bindings)
This method enumerates the env properties, ejb and resource references
etc for a J2EE component and binds them in the applicable java:
namespace.
|
void |
bindToModuleNamespace(String appName,
String moduleName,
Collection<? extends JNDIBinding> bindings)
Binds the bindings to module namespace of an application
Typically, to get access to application's module namespace, invocation context must be set to appropriate application's context. This API is useful in cases where containers within GlassFish need to bind the objects in application's module name-space and do not have application's invocation context |
Context |
getInitialContext()
Get the initial context.
|
Remote |
initializeRemoteNamingSupport(ORB orb)
Initialize RMI-IIOP naming services
|
Object |
lookup(String componentId,
String name)
Lookup a naming entry for a particular componentId
|
Object |
lookupFromAppNamespace(String appName,
String name,
Hashtable env)
Lookup a naming entry in a particular application's namespace
|
Object |
lookupFromModuleNamespace(String appName,
String moduleName,
String name,
Hashtable env)
Lookup a naming entry in a particular application's module's namespace
|
void |
publishCosNamingObject(String name,
Object obj,
boolean rebind)
Publish a CosNaming object.
|
void |
publishObject(Name name,
Object obj,
boolean rebind)
Publish an object in the naming service.
|
void |
publishObject(String name,
Object obj,
boolean rebind)
Publish an object in the naming service.
|
Context |
restoreJavaCompEnvContext(String contextName)
Recreate a context for java:comp/env or one of its sub-contexts given the
context name.
|
void |
unbindAppObject(String appName,
String name)
Remove an object from the application's namespace.
Typically, to get access to application's namespace, invocation context must be set to appropriate application's context. This API is useful in cases where containers within GlassFish need to unbind the objects in application's name-space and do not have application's invocation context |
void |
unbindAppObjects(String appName)
Unbind app and module level bindings for the given app name.
|
void |
unbindComponentObjects(String componentId)
Unbind component-level bindings
|
void |
unbindModuleObject(String appName,
String moduleName,
String name)
Remove an object from the module name-space of an application
Typically, to get access to application's module namespace, invocation context must be set to appropriate application's context. This API is useful in cases where containers within GlassFish need to unbind the objects in application's module name-space and do not have application's invocation context |
void |
unpublishCosNamingObject(String name)
Remove an object from the CosNaming service and global naming service.
|
void |
unpublishObject(Name name)
Remove an object from the naming service.
|
void |
unpublishObject(String name)
Remove an object from the naming service.
|
static final String LOGICAL_NAME
static final String NAMESPACE_METADATA_KEY
Context getInitialContext()
Object lookup(String componentId, String name) throws NamingException
NamingExceptionObject lookupFromAppNamespace(String appName, String name, Hashtable env) throws NamingException
appName - application-namename - name of the objectenv - EnvironmentNamingException - when unable to find the objectObject lookupFromModuleNamespace(String appName, String moduleName, String name, Hashtable env) throws NamingException
appName - application-namemoduleName - module-namename - name of the objectenv - EnvironmentNamingException - when unable to find the objectvoid publishObject(String name, Object obj, boolean rebind) throws NamingException
name - Object that needs to be bound.obj - Name that the object is bound as.rebind - operation is a bind or a rebind.ExceptionNamingExceptionvoid publishObject(Name name, Object obj, boolean rebind) throws NamingException
name - Object that needs to be bound.obj - Name that the object is bound as.rebind - operation is a bind or a rebind.ExceptionNamingExceptionvoid publishCosNamingObject(String name, Object obj, boolean rebind) throws NamingException
name - Object that needs to be bound.obj - Name that the object is bound as.rebind - operation is a bind or a rebind.ExceptionNamingExceptionvoid bindToComponentNamespace(String appName, String moduleName, String componentId, boolean treatComponentAsModule, Collection<? extends JNDIBinding> bindings) throws NamingException
treatComponentAsModule - true if java:comp and java:module refer to the same
namespaceNamingExceptionvoid bindToAppNamespace(String appName, Collection<? extends JNDIBinding> bindings) throws NamingException
appName - application-namebindings - list of bindingsNamingException - when unable to bind the bindingsvoid bindToModuleNamespace(String appName, String moduleName, Collection<? extends JNDIBinding> bindings) throws NamingException
appName - application-namemoduleName - module-namebindings - list of bindingsNamingException - when unable to bind the bindingsvoid unpublishObject(String name) throws NamingException
name - Name that the object is bound as.ExceptionNamingExceptionvoid unpublishCosNamingObject(String name) throws NamingException
name - Name that the object is bound as.ExceptionNamingExceptionvoid unbindAppObject(String appName, String name) throws NamingException
name - Name that the object is bound as.appName - application-nameNamingException - when unable to unbind the objectvoid unbindModuleObject(String appName, String moduleName, String name) throws NamingException
name - Name that the object is bound as.appName - application-namemoduleName - module-nameNamingException - when unable to unbind the objectvoid unpublishObject(Name name) throws NamingException
name - Name that the object is bound as.ExceptionNamingExceptionvoid unbindComponentObjects(String componentId) throws NamingException
NamingExceptionvoid unbindAppObjects(String appName) throws NamingException
NamingExceptionContext restoreJavaCompEnvContext(String contextName) throws NamingException
NamingExceptionRemote initializeRemoteNamingSupport(ORB orb) throws NamingException
orb - NamingExceptionCopyright © 2017–2020 Eclipse Foundation. All rights reserved.