0

我一直在尝试构建一个 ODM 规则执行服务器 XU 插件,该插件记录有关在规则执行期间触发的各种事件的详细信息。我尝试过实现IlrRuleEngineEventPlugin接口和扩展EventPlugin(两种方法都不起作用)。我在ra.xml中添加了对我的插件 (com.mypackage.MyPlugin) 的引用:

<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>

...并且我启用了 ruleset.trace.enabledruleset.sequential.trace.enabled规则集属性。

...但我的插件从未被调用过。

实现 RES XU 事件侦听器插件需要哪些步骤?

4

1 回答 1

1

在 WebSphere 上默认安装 ODM 的情况下,您必须在 [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"/>

停止并启动 WebSphere,您应该会看到您的插件正在加载。

于 2018-02-20T19:33:39.443 回答