可以使用基于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
谢谢,
萨拉
EDIT 目前im'using方法onMessage我把if语句决定是否管理消息...
编辑15/12/14 我使用sun-ejb-jar.xml文件而不是MDB定义中的注释更改了配置。我现在可以编辑配置文件,但这仍然在.ear文件中,我必须重建/部署才能使更改生效。有没有办法在.ear?
之外更改此文件