私たちのプロジェクトでは、特定のキューでメッセージをリッスンする MDB を使用しています。注釈として定義されます。
例:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "20")})
.
maxSessions の値を変更するには、コードを毎回コンパイルする必要があります。アノテーションとしてではなく ejb-jar.xml で設定しても、コードをコンパイルして EAR ファイルを生成する必要があります。
コードの再コンパイルが不要で、maxSession 値を「30」に変更して jboss を再起動するだけで、ユーザーが構成可能 (プロパティ ファイルから読み取る) にする方法はありますか?
親切に助けてください。
参照コード:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "ABCQueue"),
@ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "20"), @ActivationConfigProperty(propertyName="maxMessagesPerSessions",propertyValue="15")})
public class ABCMDB implements MessageListener
{
-----------
}