2011-10-12 44 views
2

我可以給ejb-jar.xml中的activation-config-property-value的正則表達式模式嗎?Reg ex for activation-config-property-value

而不是像這樣的東西。

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

我需要這樣的東西,

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

請建議。

謝謝,

回答

2

簡短的回答是:沒有。不要在JMS消息選擇由JMS API

你可以得到一個正則表達式的最接近的描述是「LIKE」構造,就像在SQL:

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

它可以讓你簡化你的選擇,但它仍然遠離正則表達式的靈活性。