Andrea Smyth wrote:
Is this for something like combining HTTPDestination with its
HTTPServerPolicy object so the configuration bean and the component
are the same?
Write xjc plugin to code generate base beans from schema. In the
future, other stuff could be generated also (such as aop.xml files for
load-time weaving in aspectJ).
HTTPDestination according to its old metadata (see
trunk/api/src/main/resources/config-metadata/http-server-cfg.xml)
should have four configurable properties:
httpServer of type HTTPServerPolicy (defined in
trunk/api/src/main/resources/schemas/wsdl/http-conf.xsd)
authorization of type AuthorizationPolicy (defined in
trunk/api/src/main/resources/schemas/configuration/security.xsd)
sslServer of type SSLServerPolicy (also defined in
trunk/api/src/main/resources/schemas/configuration/security.xsd)
contextMatchStrategy of type xs:string
These would go into one schema:
<xs:schema ...>
<xs:element name="HTTPDestinationConfiguration">
<xs:complexType>
<xs:sequence>
<xs:element name="httpServer "
type="http-conf:HTTPServerPolicy " minOccurs="0"/>
<xs:element name="authorization"
type="sec:AuthorizationPolicy" minOccurs="0"/>
<xs:element name="sslServer" type="sec:SSLServerPolicy"
minOccurs="0"/>
<xs:element name="contextMatchStrategy " type="xs:string"
default="exact" minOccurs="0"/>
<xs:sequence>
<xs:complexType>
</xs:element>
</xs:schema>
Then you'd have JettyHTTPDestination extends
HTTPDestinationConfiguration - so it has the four getters and setters
and need to call onto configuration,getObject(...) any more.
This alone does not need a xjc plugin - plain xjc will do. But in
order to make the generated HTTPDestinationConfiguration more
intelligent you need an xjc plugin that e.g. causes
HTTPDestinationConfiguration extends AbstractConfigurableBaseBean and
the setters add a call to 'notifyListeners' (from
AbstractConfigurableBaseBean).
What if we used Aspects for cases where we needed notifications? Seems
like it would make things a bit simpler.
Cheers,
- Dan
--
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com