メッセージドリブンBean構成
メッセージドリブンBean (MDB)の構成には、Oracle Utilities Smart Grid Gatewayに付属しているejb-jar.xmlおよびweblogic-ejb-jar.xml構成ファイルの変更が含まれます。これらのファイルを直接変更するのではなく、これらのファイルの顧客変更(CM)バージョンを作成し、それらの構成ファイルを変更することをお薦めします。これにより、変更内容が今後のアプリケーション・パッチで上書きされなくなります。
次の項では、前述のステップで設定した外部JMSキューから読み取るようにメッセージドリブンBeanを構成するために顧客変更ファイルで必要な変更について説明します。$SPLEBASE/templatesの下に次のファイルを作成する必要があります。
- cm_ejb-jar.xml.wls.jms_1.include
- cm_ejb-jar.xml.wls.jms_2.include
- cm_weblogic-ejb-jar.xml.jms.include.
注意: これらの変更を加えた後、initialSetupスクリプトを実行し、Oracle Utilities Smart Grid Gatewayアプリケーションを再デプロイする必要があります。ただし、initialSetupスクリプトによって前述のステップで実行したJMS構成の変更が上書きされます。そのため、このスクリプトを実行する前に$SPLEBASE/splapp/config.xmlファイルのバックアップを保存しておくことをお薦めします。
cm_ejb-jar.xml.wls.jms_1.includeへの変更
次に、cm_ejb-jar.xml.wls.jms_1.include
ファイルの例を示します。
<message-driven>
<description>MDB for DestinationQueue-CM</description>
<display-name>DestinationQueueWatcher-CM</display-name>
<ejb-name>DestinationQueueWatch-CM</ejb-name>
<ejb-class>com.splwg.ejb.mdb.MessageProcessor</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Bean</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
</message-driven>
前述のファイルで指定した値には次のものが含まれます。
- ejb-name: これはメッセージドリブンBeanの名前です。
cm_ejb-jar.xml.wls.jms_2.includeへの変更
次に、cm_ejb-jar.xml.wls.jms_2.include
ファイルの例を示します。
<assembly-descriptor>
<security-role>
<role-name>cisusers</role-name>
</security-role>
<container-transaction>
<method>
<ejb-name>DestinationQueueWatch-CM</ejb-name>
<method-name>onMessage</method-name>
</method>
<trans-attribute>NotSupported</trans-attribute>
</container-transaction>
</assembly-descriptor>
前述のファイルで指定した値には次のものが含まれます。
- ejb-name: これはメッセージドリブンBeanの名前です
cm_ejb-jar.xml.wls.jms_2.includeへの変更
次に、cm_weblogic-ejb-jar.xml.jms.include
ファイルの例を示します。
<weblogic-enterprise-bean>
<ejb-name>DestinationQueueWatch-CM</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>5</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>ForeignDestinationQueue-CM</destination-jndi-name>
<connection-factory-jndi-name>ForeignConnectionFactory-CM</connection- factory-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
前述のファイルで指定した値には次のものが含まれます。
- ejb-name: これはejb-jar.xmlで指定したメッセージドリブンBeanの名前にする必要があります
- destination-jndi-name: これは、JMSモジュールの外部サーバーの外部宛先のローカルJNDI名で指定した外部宛先のJNDI名です。
- connection-factory-jndi-name: これは、JMSモジュールの外部サーバーのリモート接続ファクトリのローカルJNDI名で指定した接続ファクトリのJNDI名です。