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