Show Table of Contents
14.2.2. POJOs
The same Connector could be configured by way of the
org.jboss.remoting.ServerConfiguration POJO:
<bean name="JBMConnector" class="org.jboss.remoting.transport.Connector">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX
(name="jboss.messaging:service=Connector,transport=bisocket",
exposedInterface=org.jboss.remoting.transport.ConnectorMBean.class,
registerDirectly=true)</annotation>
<property name="serverConfiguration"><inject bean="JBMConfiguration"/></property>
</bean>
<!-- Remoting server configuration -->
<bean name="JBMConfiguration" class="org.jboss.remoting.ServerConfiguration">
<constructor>
<parameter>bisocket</parameter>
</constructor>
<!-- Parameters visible to both client and server -->
<property name="invokerLocatorParameters">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
<key>serverBindAddress</key>
<value>
<value-factory bean="ServiceBindingManager" method="getStringBinding">
<parameter>JBMConnector</parameter>
<parameter>${host}</parameter>
</value-factory>
</value>
</entry>
<entry>
<key>serverBindPort</key>
<value>
<value-factory bean="ServiceBindingManager" method="getStringBinding">
<parameter>JBMConnector</parameter>
<parameter>${port}</parameter>
</value-factory>
</value>
</entry>
...
<entry><key>marshaller</key> <value>org.jboss.jms.wireformat.JMSWireFormat</value></entry>
<entry><key>unmarshaller</key> <value>org.jboss.jms.wireformat.JMSWireFormat</value></entry>
</map
</property>
<!-- Parameters visible only to server -->
<property name="serverParameters">
<map keyClass="java.lang.String" valueClass="java.lang.String">
<entry><key>callbackTimeout</key> <value>10000</value></entry>
</map>
</property>
...
</bean>
In this version, the configuration information is expressed in the JBMConfiguration
ServerConfiguration POJO, which is then injected into the JBMConnector org.jboss.remoting.transport.Connector POJO. The syntax is that of the Microcontainer, which is beyond the scope of this chapter. See Chapter 8, Microcontainer for details. One variation from the MBean version is the use of the ServiceBindingManager, which is also beyond the scope of this chapter. Note that the @org.jboss.aop.microcontainer.aspects.jmx.JMX annotation causes the JBMConnector to be visible as an MBean named "jboss.messaging:service=Connector,transport=bisocket".

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.