[Design of POJO Server] - Handling more complex properties in a ManagedComponent
by bytor99999
So currently there are just Simple ManagedProperty(s) in a ManagedComponent. So for DataSource, properties like jndi-name, and connection-url can easily be handled. However, support for a property like connection properties cannot be handled. Since there can be 0-many connection properties defined in a DataSource, the ManageProperty object might need to have more than one value, and is not currently supported.
As an Example, in the Oracle XA datasource in the docs dir has three <xa-datasource-property> tags. the name, attribute is what distinguishes the property. <connection-property> is another tag example.
| <xa-datasource-property name="URL">jdbc:oracle:oci8:@tc</xa-datasource-property>
| <xa-datasource-property name="User">scott</xa-datasource-property>
| <xa-datasource-property name="Password">tiger</xa-datasource-property>
|
Some other ManagedComponents and Templates might have other similar type of properties. Some might require just a List of Properties, whereas some might require a Map of Properties.
So a LoginModule can have many module-options, So if there was a Map for the module-options, the key being the name attribute value, and the value in the Map is the value of that module-option.
An example of a List property might be the URIList of the VFSDeploymentScanner.
Can this change be made?
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041165#4041165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041165
18 years, 11 months
[Design of JBoss Remoting, Unified Invokers] - Re: JBREM-63, configuration pojofication
by ron.sigal@jboss.com
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
18 years, 11 months