[jboss-dev-forums] [Design of JBoss Remoting, Unified Invokers] - Re: JBREM-63, configuration pojofication
ron.sigal@jboss.com
do-not-reply at jboss.com
Thu Apr 26 15:02:16 EDT 2007
I've made some progress on this issue, so I want to take a minute to describe what I've done.
1. As a first step in the evolution of Remoting configuration, I thougt I would try to minimize the changes, so I've written an XMl schema that describes the current Connector mbean. The only necessary changes are to add a namespace attribute and a serialDataType attribute. So, e.g.,
| <server>
| <mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=TerranceAndPhillip,transport=bisocket" display-name="TandP">
|
| <attribute name="Configuration">
|
| <config>
| <invoker transport="bisocket">
| ...
| <attribute name="timeout" isParam="true">0</attribute>
| ...
| </invoker>
| <handlers>
| <handler>...</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
| </server>
|
would become
| <server>
| <mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=TerranceAndPhillip,transport=bisocket" display-name="TandP">
|
| <!-- CHANGE: added xmlns, serialDataType -->
| <attribute name="Configuration"
| xmlns="http://www.jboss.org/remoting/connector.xsd"
| serialDataType="jbxb">
|
| <config>
| <invoker transport="bisocket">
| ...
| <attribute name="timeout" isParam="true">0</attribute>
| ...
| </invoker>
| <handlers>
| <handler>...</handler>
| </handlers>
| </config>
| </attribute>
| </mbean>
| </server>
|
2. The schema causes JBossXB to unmarshall the Configuration attribute into an org.jboss.remoting.transport.Configuration object. I've changed the ConnectorMBean.setConfiguration(Element xml) method to ConnectorMBean.setConfiguration(Configuration conf), and left the legacy Connector.setConfiguration(Element xml) method in place, though deprecated. The result is that JBossAS Remoting descriptors will have to be updated, but legacy application code that uses the old version of Connector.setConfiguration() will continue to work.
I also have some questions.
1. Does what I've done conform to what JBREM-63 calls for?
2. I've used a "filename" namespace, "http://www.jboss.org/remoting/connector.xsd", which works for org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver, and I've put the schema in jboss-remoting.jar. Is that OK?
3.
anonymous wrote :
| Connector object itself seemed superfluous as its just aggregating configuration and parsing
|
I suppose the goal is to configure the server invokers as independent pojos, but a problem is that server invokers are created by a factory method in org.jboss.remoting.InvokerRegistry, which is called by Connector. In this particular case, I could change things so that server invokers are created by constructors that register the new invoker with InvokerRegistry, but it seems like a general issue, and I'm wondering if there is a general solution.
-Ron
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041143#4041143
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041143
More information about the jboss-dev-forums
mailing list