The remoting connector could not simply be ported to a mc bean as it does not support its
configuration as a pojo. The workaround I came up with was to introduce an mc bean proxy
for the connector mbean using factoryClass attribute and the existing
org.jboss.mx.util.MBeanTyper factory type class:
| <bean name="ConnectorMBean">
| <!-- MBeanTyper.typeMBean(MBeanServer, ObjectName, Class iface) -->
| <constructor factoryClass="org.jboss.mx.util.MBeanTyper"
factoryMethod="typeMBean">
| <parameter><inject bean="JMXKernel"
property="mbeanServer"/></parameter>
|
<parameter>jboss.remoting:service=Connector,transport=socket</parameter>
|
<parameter>org.jboss.remoting.transport.ConnectorMBean</parameter>
| </constructor>
| </bean>
| <!--
| Add a ProfileService handler to the remoting socket connector
| -->
| <bean name="ProfileServiceInvocationHandler"
| class="org.jboss.aspects.remoting.AOPRemotingInvocationHandler">
| <install bean="ConnectorMBean"
method="addInvocationHandler">
| <parameter>ProfileService</parameter>
| <parameter><this/></parameter>
| </install>
| <uninstall bean="ConnectorMBean"
method="removeInvocationHandler">
| <parameter>ProfileService</parameter>
| </uninstall>
| </bean>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000198#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...