@Service @Singleton public final class GlassfishNamingManagerImpl extends Object implements GlassfishNamingManager
| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_COSNAMING_UNBIND |
static String |
IIOPOBJECT_FACTORY |
static String |
NAMING_ALREADY_EXISTS |
LOGICAL_NAME, NAMESPACE_METADATA_KEY| Constructor and Description |
|---|
GlassfishNamingManagerImpl() |
GlassfishNamingManagerImpl(InitialContext ic)
Create the naming manager.
|
| 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 component's java:comp
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 naming context.
|
NameParser |
getNameParser() |
Remote |
initializeRemoteNamingSupport(ORB orb)
Initialize RMI-IIOP naming services
|
NamingEnumeration<NameClassPair> |
list(String name) |
NamingEnumeration<Binding> |
listBindings(String name) |
Object |
lookup(String name) |
Object |
lookup(String name,
SerialContext serialContext)
This method is called from SerialContext class.
|
Object |
lookup(String componentId,
String name)
Lookup object for a particular componentId and name.
|
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 a name in the naming service.
|
void |
publishObject(String name,
Object obj,
boolean rebind)
Publish a name 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)
This method enumerates the env properties, ejb and resource references
and unbinds them from the java:comp namespace.
|
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 naming service.
|
void |
unpublishObject(Name name)
Remove an object from the naming service.
|
void |
unpublishObject(String name)
Remove an object from the naming service.
|
public static final String ERROR_COSNAMING_UNBIND
public static final String NAMING_ALREADY_EXISTS
public static final String IIOPOBJECT_FACTORY
public GlassfishNamingManagerImpl()
throws NamingException
NamingExceptionpublic GlassfishNamingManagerImpl(InitialContext ic) throws NamingException
ic - NamingExceptionpublic Context getInitialContext()
getInitialContext in interface GlassfishNamingManagerpublic NameParser getNameParser()
public Remote initializeRemoteNamingSupport(ORB orb) throws NamingException
GlassfishNamingManagerinitializeRemoteNamingSupport in interface GlassfishNamingManagerNamingExceptionpublic void publishObject(String name, Object obj, boolean rebind) throws NamingException
publishObject in interface GlassfishNamingManagername - Name that the object is bound as.obj - Object that needs to be bound.rebind - flagNamingException - if there is a naming exception.public void publishObject(Name name, Object obj, boolean rebind) throws NamingException
publishObject in interface GlassfishNamingManagername - Name that the object is bound as.obj - Object that needs to be bound.rebind - flagNamingException - if there is a naming exception.public void publishCosNamingObject(String name, Object obj, boolean rebind) throws NamingException
GlassfishNamingManagerpublishCosNamingObject in interface GlassfishNamingManagername - Object that needs to be bound.obj - Name that the object is bound as.rebind - operation is a bind or a rebind.NamingExceptionpublic void unpublishObject(String name) throws NamingException
GlassfishNamingManagerunpublishObject in interface GlassfishNamingManagername - Name that the object is bound as.NamingExceptionpublic void unpublishCosNamingObject(String name) throws NamingException
unpublishCosNamingObject in interface GlassfishNamingManagername - Name that the object is bound as.NamingExceptionpublic void unpublishObject(Name name) throws NamingException
unpublishObject in interface GlassfishNamingManagername - Name that the object is bound as.NamingExceptionpublic Object lookupFromAppNamespace(String appName, String name, Hashtable env) throws NamingException
GlassfishNamingManagerlookupFromAppNamespace in interface GlassfishNamingManagerappName - application-namename - name of the objectenv - EnvironmentNamingException - when unable to find the objectpublic Object lookupFromModuleNamespace(String appName, String moduleName, String name, Hashtable env) throws NamingException
GlassfishNamingManagerlookupFromModuleNamespace in interface GlassfishNamingManagerappName - application-namemoduleName - module-namename - name of the objectenv - EnvironmentNamingException - when unable to find the objectpublic void bindToComponentNamespace(String appName, String moduleName, String componentId, boolean treatComponentAsModule, Collection<? extends JNDIBinding> bindings) throws NamingException
bindToComponentNamespace in interface GlassfishNamingManagerappName - moduleName - componentId - bindings - treatComponentAsModule - true if java:comp and java:module refer to the same
namespaceNamingExceptionpublic void bindToModuleNamespace(String appName, String moduleName, Collection<? extends JNDIBinding> bindings) throws NamingException
GlassfishNamingManagerbindToModuleNamespace in interface GlassfishNamingManagerappName - application-namemoduleName - module-namebindings - list of bindingsNamingException - when unable to bind the bindingspublic void bindToAppNamespace(String appName, Collection<? extends JNDIBinding> bindings) throws NamingException
GlassfishNamingManagerbindToAppNamespace in interface GlassfishNamingManagerappName - application-namebindings - list of bindingsNamingException - when unable to bind the bindingspublic void unbindComponentObjects(String componentId) throws NamingException
unbindComponentObjects in interface GlassfishNamingManagerNamingExceptionpublic void unbindAppObjects(String appName) throws NamingException
GlassfishNamingManagerunbindAppObjects in interface GlassfishNamingManagerNamingExceptionpublic void unbindAppObject(String appName, String name) throws NamingException
GlassfishNamingManagerunbindAppObject in interface GlassfishNamingManagerappName - application-namename - Name that the object is bound as.NamingException - when unable to unbind the objectpublic void unbindModuleObject(String appName, String moduleName, String name) throws NamingException
GlassfishNamingManagerunbindModuleObject in interface GlassfishNamingManagerappName - application-namemoduleName - module-namename - Name that the object is bound as.NamingException - when unable to unbind the objectpublic Context restoreJavaCompEnvContext(String contextName) throws NamingException
restoreJavaCompEnvContext in interface GlassfishNamingManagerNamingExceptionpublic Object lookup(String name) throws NamingException
NamingExceptionpublic Object lookup(String name, SerialContext serialContext) throws NamingException
NamingExceptionpublic Object lookup(String componentId, String name) throws NamingException
lookup in interface GlassfishNamingManagerNamingExceptionpublic NamingEnumeration<NameClassPair> list(String name) throws NamingException
NamingExceptionpublic NamingEnumeration<Binding> listBindings(String name) throws NamingException
NamingExceptionCopyright © 2019. All rights reserved.