Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Print Bookmark Alert me when this article is updated


HOW TO: Programmatically access object attribute values (C-API)
UM primitive objects (context, source, receiver etc) have a corresponding attributes structure through which you can access that object's option values. Most options can only be set at object initialization.

To do so, the desired attributes structure object is created via an API call then its values appropriately manipulated. For flat file configurations, the call is lbm_*_attr_create(). For XML configuration files, use the lbm_*_attr_create_from_xml(). 
Here, * represents the relevant object - context, event_queue, rcv_topic etc. 

This call creates an attributes object with UM options at either factory defaults or those values specified in a configuration file, if one was previously loaded with lbm_config(). The attributes object options can then be read or set with the relevant *_getopt(), *_setopt() calls.

For XML configuration files, it is best to specify the applications name in the <application> tag, then load the XML file using lbm_config_xml_file() (or via environment variable LBM_XML_CONFIG_FILENAME or LBM_UMM_INFO). This ensures that only relevant parts of the XML file are available to the process. In addition, a context name may also be specified in the <context> tag and then used as the second parameter in the lbm_context_attr_create_from_xml() call. The name attribute defines the scope of the XML file that is loaded, which is especially useful in cases where multiple applications and operating requirements use the same XML file.

The attributes are applied when passed as a parameter at the time a primitive object is created; for example lbm_context_create(ctxctx_attr....), where ctx is the context object andctx_attr is the attributes structure.

More Information
Applies To
Product: Ultra Messaging
Problem Type: Configuration
User Type: Developer
Project Phase: Configure
Product Version:
Operating System:
Other Software:
Last Modified Date:7/8/2019 9:14 AMID:579053
People who viewed this also viewed


Did this KB document help you?

What can we do to improve this information (2000 or fewer characters)