|
Some thoughts:
First, an example declaring a completely new service ("registry expansion"). Here we simply name the service impl:
<registry xmlns="http://www.hibernate.org/xsd/registry" target="standard">
<services>
<service role="com.acme.JmsSupport">
<impl>com.acme.JmsSupportStandardImpl</impl>
<config>
???
</config>
</service>
</services>
</registry>
Should also be able to name an initiator:
<registry xmlns="http://www.hibernate.org/xsd/registry" target="standard">
<services>
<service role="com.acme.JmsSupport">
<initiator>com.acme.JmsSupportInitiator</initiator>
</service>
</services>
</registry>
If the service implements Configurable, it can accept config (Map/Properties) which should be exposed in the XML:
<registry xmlns="http://www.hibernate.org/xsd/registry" target="standard">
<services>
<service role="com.acme.JmsSupport">
<impl>com.acme.JmsSupportStandardImpl</impl>
<config>
<setting name="queueName">theJmsQueue</setting>
...
</config>
</service>
</services>
</registry>
Support for basic conversions would be nice too:
<registry xmlns="http://www.hibernate.org/xsd/registry" target="standard">
<services>
<service role="com.acme.JmsSupport">
<impl>com.acme.JmsSupportStandardImpl</impl>
<config>
<setting name="queueName">theJmsQueue</setting>
<setting name="timeout" type="integer">1000</setting>
...
</config>
</service>
</services>
</registry>
TODO.. what about config when initiator is used?
|