开发者

Reg ex for activation-config-property-value

Can I give a regex pattern for activation-config-property-value in ejb-jar.xml?

instead of something like this.

<activati开发者_如何学运维on-config-property>
<activation-config-property-name>messageSelector</activation-config-property-name>
<activation-config-property-value>header='90S' or header='90MS' or header='92S' or header='97S' or header='89S' or header='96CDS'</activation-config-property-value>
</activation-config-property>

I need something like,

<activation-config-property>
<activation-config-property-name>messageSelector</activation-config-property-name>
<activation-config-property-value>header='%S%'</activation-config-property-value>
</activation-config-property>

Please suggest.

Thanks,


The short answer is: no. Not in JMS message selectors as described by the JMS API

The closest you can get to a regular expression is the "LIKE" construct, like in SQL:

header LIKE 9%S // matches 9.*S
header LIKE 9_S // matches 9.S

It will let you simplify your selector, but it's still far from regex' flexibility.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜