Show Table of Contents
12.2. JBoss Remoting の設定
Remoting コネクターの作成や設定に使用できる XML ファイルには 2 つの種類があります。 コネクターを MBean として定義するには、 ファイル名が *-service.xml 形式のファイルを使用します。 コネクターを POJO として定義するには、 ファイル名が *-jboss-beans.xml 形式のファイルを使用します。
12.2.1. MBean
JBoss Messaging JMS サブシステムでは、Remoting サーバーはファイル remoting-bisocket-service.xml で設定されます。以下はこのファイルを省略したものになります。
<mbean code="org.jboss.remoting.transport.Connector" name="jboss.messaging:service=Connector,transport=bisocket" display-name="Bisocket Transport Connector"> <attribute name="Configuration"> <config> <invoker transport="bisocket"> <attribute name="marshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute> <attribute name="unmarshaller" isParam="true">org.jboss.jms.wireformat.JMSWireFormat</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">4457</attribute> <attribute name="callbackTimeout">10000</attribute> ... </invoker> ... </config> </attribute> </mbean>
この設定ファイルから次のような情報を得ることができます。
- このサーバーは bisocket トランスポートを使用
- ホスト ${jboss.bind.address}; の 4457 番ポートで稼働
- JBoss Messaging は独自のマーシャリングアルゴリズムを使用
InvokerLocator はこのファイルに由来しています。 ここで重要なのは、 InvokerLocator にパラメーターが含まれるかを 「isParam」 属性が判断するということです。「isParam」 が省略されるか、false に設定されると、 パラメーターが適用されるのはサーバーのみでクライアントには通信されません。 Remoting サーバーの InvokerLocator に bluemonkeydiamond.com という ${jboss.bind.address} がある場合、 次のようになります。
bisocket://bluemonkeydiamond.com:4457/?marshaller= org.jboss.jms.wireformat.JMSWireFormat& unmarshaller=org.jboss.jms.wireformat.JMSWireFormat
InvokerLocator には「callbackTimeout」パラメーターは含まれていません。