2011-01-14 17 views
2

$MQM_HOME/samp/pcf/samples/PCF_CreateQeue.javaで詳しく説明されているように、WebSphere APIでPCFコマンドを使用してキューを作成しようとしています。私はエラーを取得する説明WebSphere MQ APIを使用してキューを作成中にエラーが発生しました

command.addParameter(PCFConstants.MQCA_Q_DESC, "Created using MQMonitor"); 

を追加するときに作成が失敗:com.ibm.mq.pcf.PCFException: MQJE001: Completion Code 2, Reason 3015 : MQRCCF_CFST_PARM_ID_ERROR があるが、私はAPIのバージョン6を使用している記述を設定する別の方法です。 PCFマニュアルの状態で

答えて

1

PCFMessageaddParameterは、特定のシーケンス(それにつまずいています)が必要です。もし私が動作する場合、私はパラメータを変更します。これは、キューを作成するだけでなく、チャネルも作成します。

command.addParameter(PCFConstants.MQCA_Q_NAME, qname); 
command.addParameter(PCFConstants.MQIA_Q_TYPE, PCFConstants.MQQT_LOCAL); 
command.addParameter(PCFConstants.MQCA_Q_DESC, qdesc); 
command.addParameter(PCFConstants.MQIA_DEF_PERSISTENCE, PCFConstants.MQPER_PERSISTENT); 

上記はエラーなく実行されます。

command.addParameter(PCFConstants.MQCA_Q_NAME, qname); 
command.addParameter(PCFConstants.MQCA_Q_DESC, qdesc); 
command.addParameter(PCFConstants.MQIA_Q_TYPE, PCFConstants.MQQT_LOCAL); 
command.addParameter(PCFConstants.MQIA_DEF_PERSISTENCE, PCFConstants.MQPER_PERSISTENT); 

説明を移動した後、上記は失敗します。

私はそれがJavaのドキュメントに書かれているのを見たことがありません。もしそうならば、私はいくつか隠すことを楽しみにしています。

+1

私は初期の回答を捨てて、適切なマニュアルへのリンクを使って回答を更新しました。 Javaマニュアルには記載されていません。 –

2

Commands pageこと:

The required parameters and the optional parameters are listed. On platforms other than z/OS®, the parameters must occur in the order:

  1. All required parameters, in the order stated, followed by
  2. Optional parameters as required, in any order, unless specifically noted in the PCF definition.

セクションChange, Copy and Create Queueリスト次の順序で必要なパラメータ:

  1. がMQCA_Q_NAME含む
  2. MQIA_Q_TYPE
  3. オプションのパラメータを、 QDesc

同じマニュアルでは、すべてのPCFコマンドに必要なパラメータとその順序が提供されているため、将来的に隠れて試してみる必要はありません。

関連する問題