Collapse All Expand All

.NET Framework Class Library
Members See Also

[TIBCO.EMS .NET client library 6.1 documentation]

Search for and perform queries on administered objects in the EMS server

Namespace: TIBCO.EMS
Assembly: TIBCO.EMS (in TIBCO.EMS.dll)

# Syntax

    public class LookupContext : ILookupContext

    Public Class LookupContext _
    	Implements ILookupContext

    public ref class LookupContext : ILookupContext

# Remarks

The LookupContext class provides an interface for users to search and perform queries against the naming/directory server built into EMS.

User can create an instance of the LookupContext and invoke the Lookup(string name) method which returns the queried object or throw a NamingException in case of failure. The information required to perform a search includes the url of the directory service provider (e.g. the Tibco Enterprise Message Service Server) and user name and password, if necessary.

The following is an example of its usage:

# Examples

| Copy Code
--- | ---
                    Hashtable env = new Hashtable();
                    env.Add(LookupContext.PROVIDER_URL, "tibjmsnaming://localhost:7222");
                    env.Add(LookupContext.SECURITY_PRINCIPAL", "myUserName");
                    env.Add(LookupContext.SECURITY_CREDENTIALS", "myPassword");
                    try {
                        LookupContext searcher = new LookupContext(env);
                        TIBCO.EMS.Queue queue = (TIBCO.EMS.Queue)searcher.Lookup("theQueueName");
                        ...
                    } catch (NamingException) {
                        ...
                    }

# Inheritance Hierarchy

System..::.Object
TIBCO.EMS..::.LookupContext

# See Also

LookupContext Members
TIBCO.EMS Namespace