[TIBCO.EMS.UFOCLIENT .NET client library 8.1 documentation]

Lookup an object in the naming server

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

Syntax

public override Object Lookup(
	string name
)
Public Overrides Function Lookup ( _
	name As String _
) As Object
public:
virtual Object^ Lookup(
	String^ name
) override

Parameters

name
Type: System..::.String
The name of the object to look up from the naming server.

Return Value

The named object.

Implements

ILookupContextLookup(String)

Remarks

This method provides the naming service to query an object by its name.

Examples

For example:

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

Exceptions

ExceptionCondition
AuthenticationExceptionIf authentication to the naming server has failed.
ServiceUnavailableExceptionIf the naming service is unavailable.
NamingExceptionIf the named object is not found or the query to the naming service failed.

See Also