VisiBroker for Java

com.inprise.vbroker.CosNamingExt
Interface NamingContextFactoryOperations

All Known Subinterfaces:
ExtendedNamingContextFactory, ExtendedNamingContextFactoryOperations, NamingContextFactory

public interface NamingContextFactoryOperations

The NamingContextFactory provides useful functionality that concerns an instance of a Naming Service. It also provides the ability to instantiate an initial NamingContext.

A client may bind to an object of this type and use the create_context method to create an initial context. Once the initial context has been created, the new_context method can be used to create other contexts. An instance of this naming context factory is created when the naming service is started. A description is available in the Naming Service chapter of the Borland Enterprise Server Developer's Guide.


Method Summary
 NamingContextExt create_context()
          Allows a client to create a naming context.
 ClusterManager get_cluster_manager()
          Retrieves the Cluster Manager.
 NamingContext[] list_all_roots(java.lang.String password)
          Returns a set of contexts from which every context and object binding can be accessed.
 void remove_stale_contexts(java.lang.String password)
          Removes contexts that have been destroyed.
 void shutdown()
          Allows a client to gracefully shutdown the naming service.
 

Method Detail

list_all_roots

NamingContext[] list_all_roots(java.lang.String password)
Returns a set of contexts from which every context and object binding can be accessed. The list_all_roots function returns a minimum set of contexts, including the distinguished root context, from which you can access every context and object binding that are in the Naming Server. There is a need for such a function to deal with orphan contexts. Orphan contexts can be created by the undisciplined use of unbind operations on the directory tree. An unbind operation on a context basically break the link between that context and its parent. If the user is not careful, that context and possibly the contexts that can directly or indirectly link to it, may become inaccessible through the distinguished root context. Over time, the number of orphan contexts may accumulate and there is no way to manage or get rid of them through the standard naming api. This is where the list_all_root function comes in. It allows you to access all contexts, orphan or otherwise.

We recommend for list_all_roots() to be used by the administrator who maintains the name space. This is an expensive operation and should be used sparingly. It requires traversing through the entire namespace and may take a long time. That's why list_all_roots() requires a password to prevent against accidental usage. The default password is "VisiNaming"

Parameters:
password - the password

remove_stale_contexts

void remove_stale_contexts(java.lang.String password)
Removes contexts that have been destroyed. When a naming context is destroyed (by calling destroy()), its binding is not removed from the Naming Server. Its binding name can still be resolved, but the object reference returned by the resolve() is invalid. These contexts are called stale contexts. remove_stale_contexts() removes all the binding name corresponding to the destroyed contexts, from the name space.

It is recommended for remove_all_roots() to be used by the administrator who maintains the name space. This is an expensive operation and should be used sparingly. It requires traversing through the entire namespace and may take a long time. The remove_all_roots() call requires a password to prevent against accidental usage. The default password is "VisiNaming"


get_cluster_manager

ClusterManager get_cluster_manager()
Retrieves the Cluster Manager. The role of a Cluster Manager is to create, retrieve and keep track of the clusters that are in the Naming Server. All creations of Clusters have to be done through the ClusterManager. Once a Cluster reference is bound into the Naming Service, there is no way to retrieve it through a Context; the Context Interface can only return the members of a Cluster but not the Cluster itself. The duty for the retrieval of existing Clusters in the Naming Server is relegated to the ClusterManager.


shutdown

void shutdown()
Allows a client to gracefully shutdown the naming service.


create_context

NamingContextExt create_context()
Allows a client to create a naming context. Since the specification for naming contexts states that they do not have any notion of a root context, simply instantiating a NamingContextFactory will not create a naming context.


Borland Software Corporation
http://www.borland.com
100 Enterprise Way
Scotts Valley, CA 95066
Voice: (831) 431-1000
pubsweb@borland.com

Read the latest documentation online