可以有一个基于 System 属性的 messageSelector 值吗?
我有一个 MDB:
@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "notification_channel_id = 'EMAIL' AND instance= 'domain1'")
我会拥有的是:
@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "notification_channel_id = 'EMAIL' AND instance= MY_INSTANCE")
其中MY_INSTANCE
是值为“domain1”或“domain2”的系统属性......等等(取决于域名)
(系统属性通过 glassfish JVM-OPTION 设置)
我的目标是让 MDB 只管理收件人是 MDB 所属实例的消息。
Glassfish 版本是 2.1
,谢谢,
Sara
编辑此刻我正在使用方法 onMessage ,我在其中放置 if 语句来决定是否管理消息......
编辑 15/12/14 我使用 sun-ejb-jar.xml 文件而不是 MDB 定义中的注释更改了配置。我现在可以编辑配置文件,但这仍然在 .ear 文件中,我必须重建/部署才能使更改生效。有没有办法在 .ear 之外更改这个文件?