I've been trying to build an ODM Rule Execution Server XU plugin that logs details about the various events that are fired during rule execution. I've tried implementing the IlrRuleEngineEventPlugin
interface and extending EventPlugin
(neither approach worked). I've added a reference to my plugin (com.mypackage.MyPlugin) to ra.xml:
<config-property>
<config-property-name>plugins</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>
{pluginClass=Management,xuName=default,protocol=jmx},
{pluginClass=DVS},
{pluginClass=HTDS},
{pluginClass=Event,EventDestinationType=Topic,EventDestinationConnectionFactoryName=jms/WbeTopicConnectionFactory,EventDestinationName=jms/eventDestination},
{pluginClass=com.mypackage.MyPlugin,foo=bar,fiz=baz}
</config-property-value>
</config-property>
... and I've enabled ruleset.trace.enabled and ruleset.sequential.trace.enabled ruleset properties.
... but my plugin is never invoked.
What are the steps that are required to implement a RES XU event listener plugin?
In the case of a default install of ODM on WebSphere, you have to modify this line in [WEBSPHERE-ROOT]\AppServer\profiles\ODMSample8810\config\cells\SamplesCell\nodes\SamplesNode\resources.xml
<resourceProperties
xmi:id="J2EEResourceProperty_1501875435118"
name="plugins" type="java.lang.String"
value="{
pluginClass=Management,xuName=default,protocol=jmx},
{pluginClass=DVS},
{pluginClass=HTDS},
{pluginClass=Event,EventDestinationType=Topic,EventDestinationConnectionFactoryName=jms/WbeTopicConnectionFactory,EventDestinationName=jms/eventDestination},
{pluginClass=com.mypackage.MyPlugin,foo=bar,fiz=baz}"
required="false"
ignore="false"
confidential="false"
supportsDynamicUpdates="false"/>
Stop and start WebSphere and you should see your plugin being loaded.