> tibemsLookupContext
> Type
> Purpose
> Retrieve objects from the server’s naming directory.
> Remarks
> The context object establishes communication with an EMS server or an LDAP server, authenticates the user, and submits name queries.
> Name queries can retrieve connection factories and destinations.

> Function | Description | Page
> tibemsLookupContext_Create tibemsLookupContext_CreateSSL | Create a new EMS lookup context object. | 323
> tibemsLookupContext_CreateExternal | Create a new LDAP lookup context object. | 325
> tibemsLookupContext_Destroy | Destroy a lookup context and reclaim resources. | 326
> tibemsLookupContext_Lookup tibemsLookupContext_LookupDestination tibemsLookupContext_LookupConnectionFactory | Lookup an object in the naming server. | 327

> tibemsLookupContext_Create
> Function
> Purpose
> Create a new EMS lookup context object.
> C Declaration
> tibems_status tibemsLookupContext_Create(
> tibemsLookupContext* context,
> const char* brokerURL,
> const char* username,
> const char* password );
> tibems_status tibemsLookupContext_CreateSSL(
> tibemsLookupContext* context,
> const char* brokerURL,
> const char* username,
> const char* password,
> tibemsSSLParams sslParams,
> const char* pk_password );
> COBOL Call
> CALL "tibemsLookupContext_Create"
> USING BY REFERENCE context,
> BY REFERENCE brokerURL,
> BY REFERENCE username,
> BY REFERENCE password,
> RETURNING tibems-status
> END-CALL.
> CALL "tibemsLookupContext_CreateSSL"
> USING BY REFERENCE context,
> BY REFERENCE brokerURL,
> BY REFERENCE username,
> BY REFERENCE password,
> BY VALUE sslParams,
> BY REFERENCE pk-password,
> RETURNING tibems-status
> END-CALL.

> | context and sslParams have usage pointer.

> Parameters

> Parameter | Description
> context | The function stores the new lookup context object in this location.
> brokerURL | The context object connects to the EMS server at this URL. If configuring a fault-tolerant client, enter two of more URLs, as described in Configuring C and COBOL Clients for Fault-Tolerant Connections.
> username | The context object identifies itself to the server with this user name.
> password | The context object identifies itself to the server with this password.
> sslParams | The context object uses this data to create an SSL connection to the EMS server.
> pk_password | The context object uses this password to decrypt its SSL private key.

> Remarks
> The first call produces a lookup context that communicates with server without encryption. The second call produces a lookup context that communicates using an SSL connection.
> If the server permits anonymous lookup, you may supply null values for the username and password parameters.
> See Also
> tibemsLookupContext_CreateExternal on page 325
> tibemsLookupContext_CreateExternal
> Function
> Purpose
> Create a new LDAP lookup context object.
> C Declaration
> tibems_status tibemsLookupContext_CreateExternal(
> tibemsLookupContext* context,
> tibemsLookupParams lookupParams );
> COBOL Call
> CALL "tibemsLookupContext_CreateExternal"
> USING BY REFERENCE context,
> BY VALUE lookupParams,
> RETURNING tibems-status
> END-CALL.

> | context and lookupParams have usage pointer.

> Parameters

> Parameter | Description
> context | The function stores the new lookup context object in this location.
> lookupParams | The context object uses these parameters to connect to an LDAP server. After the function returns successfully, the calling program may delete this struct.

> See Also
> tibemsLookupContext_Create on page 323
> tibemsLookupParams on page 329
> tibemsLookupParams_Create on page 330
> tibemsLookupParams_Destroy on page 331
> tibemsLookupContext_Destroy
> Function
> Purpose
> Destroy a lookup context and reclaim resources.
> C Declaration
> tibems_status tibemsLookupContext_Destroy(
> tibemsLookupContext context );
> COBOL Call
> CALL "tibemsLookupContext_Destroy"
> USING BY VALUE context,
> RETURNING tibems-status
> END-CALL.

> | context has usage pointer.

> Parameters

> Parameter | Description
> context | Destroy this lookup context object.

> tibemsLookupContext_Lookup
> Function
> Purpose
> Lookup 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.

> | context, object, destination and factory have usage pointer.

> Parameters

> Parameter | Description
> context | Destroy this lookup context object.
> name | Lookup this name.
> object destination factory | The function stores the results of the lookup operation in this location.

> Remarks
> These calls look up names in either the name server portion of an EMS server, or in an LDAP 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.

Copyright © TIBCO Software Inc. All Rights Reserved.