此内容没有您所选择的语言版本。
10.3. Multihomed servers
Remoting can create servers bound to multiple interfaces. One application of this facility would be binding a server to one interface that faces the internet and another that faces a LAN. For example, the preceding POJO example can be modified by (1) adding POJOs
which results in a StringBuffer with a value something like (according to the ServiceBindingManager configuration values for JBMConnector:bindingHome1 and JBMConnector:bindingHome2) "external.acme.com:5555!internal.acme.com:4444", and (2) replacing the "serverBindAddress" and "serverBindPort" parameters with
<entry> <key>homes</key> <value><value-factory bean="homes2" method="toString"/></value> </entry>
<entry>
<key>homes</key>
<value><value-factory bean="homes2" method="toString"/></value>
</entry>
which transforms the StringBuffer into the String "external.acme.com:5555!internal.acme.com:4444" and injects it into the JBMConnector. The resulting InvokerLocator will look like
bisocket://multihome/?homes=external.acme.com:5555!internal.acme.com: 4444&marshaller=org.jboss.jms.wireformat.JMSWireFormat& unmarshaller=org.jboss.jms.wireformat.JMSWireFormat
bisocket://multihome/?homes=external.acme.com:5555!internal.acme.com:
4444&marshaller=org.jboss.jms.wireformat.JMSWireFormat&
unmarshaller=org.jboss.jms.wireformat.JMSWireFormat