Configuring event emitters to create new transactions
In IBM Business Monitor V8.5.5, you can use wsadmin commands to control whether Dynamic Event Framework (DEF) events are emitted in a new transaction or an existing transaction.
About this task
You can set up end-to-end monitoring of your business transactions, even if those transactions are composed of discrete processes from different products. You can then view the status of the end-to-end transactions on the generated dashboard.
By default, the Dynamic Event Framework is configured to deliver events into an existing transaction. If you want to deliver events so that they start a new transaction, you can make that happen by using wsadmin commands to change the default behavior.
Each cell has a Dynamic Event Framework configuration. That configuration is shared by the DEF component, which runs in every Java virtual machine in that cell. You can change the default transaction behavior for the DEF configuration to run in a new transaction for a specified event point key. For more information about event point keys, see Event point key and filter.
At run time, when the DEF configuration is reloaded, the transaction configuration is read and cached. After that point, when an event is emitted, its associated event point key is checked against all DefFilter objects that are contained in the DefTransactionRules inside the DefTransactionConfig object. If any event point filter matches the event point key, the existing transaction (if any) is suspended and a new transaction is started. After that, the event is emitted synchronously or asynchronously. If no event point filter matches the event point key, the existing transaction is used.
This procedure uses wsadmin scripting. For information about the wsadmin commands that are used in these scripts, see Commands for the AdminConfig object using wsadmin scripting.
Procedure
Example
cellid = AdminConfig.list('Cell')
tConfigId = AdminConfig.create('DefTransactionConfig', cellid, '[]')
tRuleOptions = [['ruleId','newAll']]
tRule = AdminConfig.create('DefTransactionRule',tConfigId,tRuleOptions)
tFilterOptions = [['filterId','newAll-filter'],['appName','*'],['version','*'],['componentType','*'],['componentName','*'],['elementType','*'],['elementName','*'],['nature','*']]
tFilter = AdminConfig.create('DefFilter',tRule,tFilterOptions)
AdminConfig.save()
Reload the configured event listeners:
dmList = AdminControl.queryNames('type=DefManagement,*').splitlines()
AdminControl.invoke(dmList[0],'reloadConfiguredEventListeners')
AdminControl.invoke(dmList[1],'reloadConfiguredEventListeners')
AdminControl.invoke(dmList[2],'reloadConfiguredEventListeners')
AdminConfig.save()
What to do next
If you find at some time that you must delete a DefTransactionConfig object, use a script such as this one:
remId = AdminConfig.list('DefTransactionConfig')
rem = AdminConfig.remove(remId)
AdminConfig.save()