tibemsLookupContext_Lookup

Function

Purpose

Look up an object in the naming server.

C Declaration

tibems_status tibemsLookupContext_Lookup(
    tibemsLookupContext context,
    const char* name,
    void** object);

tibems_status tibemsLookupContext_LookupDestination(
    tibemsLookupContext context,
    const char* name,
    tibemsDestination* destination);

tibems_status tibemsLookupContext_LookupConnectionFactory(
    tibemsLookupContext context,
    const char* name,
    tibemsConnectionFactory* factory);

COBOL Call

CALL "tibemsLookupContext_Lookup"
     USING BY VALUE context,
           BY REFERENCE name,
           BY REFERENCE object,
           RETURNING tibems-status
END-CALL.

CALL "tibemsLookupContext_LookupDestination"
     USING BY VALUE context,
           BY REFERENCE name,
           BY REFERENCE destination,
           RETURNING tibems-status
END-CALL.

CALL "tibemsLookupContext_LookupConnectionFactory"
     USING BY VALUE context,
           BY REFERENCE name,
           BY REFERENCE factory,
           RETURNING tibems-status
END-CALL.
Note: context, object, destination and factory have usage pointer.

Parameters

Parameter Description
context Destroy this lookup context object.
name Lookup this name.
object

destination

factory

Store the results of the lookup operation.

Remarks

These calls look up names in the name server portion of an EMS server.

The first call looks up a generic object; the calling program must cast the result to the expect type. The other calls restrict lookup to either destinations or connection factories.

If the server does not find the name, this call returns TIBEMS_NOT_FOUND.

If the server finds both a topic and a queue with the same name, this call returns TIBEMS_ILLEGAL_STATE.

The calling program must destroy the resulting object when it is no longer needed.