문제

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

instead of something like this.

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top