This content has been marked as final.
Show 3 replies
-
1. Re: Deployment Enhancement - Custom Attribute handler
starksm64 Jun 6, 2005 7:30 PM (in response to mike.chack)Use the code tag to encapsulate xml.
This looks like an extension to the existing attribute injection mechanism where instead of:<mbean code="org.jboss.test.jmx.proxy.ProxyTests" name="jboss.test:name=ProxyTestsAttribute"> <depends optional-attribute-name="xxx" proxy-type="attribute">:name=ConfigService</depends> </mbean>
there is a key<mbean code="org.jboss.test.jmx.proxy.ProxyTests" name="jboss.test:name=ProxyTestsAttribute"> <depends optional-attribute-name="xxx" proxy-type="attribute" handler="mydatahandler" key="some-key">:name=ConfigService</depends> </mbean>
where the handler knows how to extract the some-key value of type matching the attribute type from the dependency target. -
2. Re: Deployment Enhancement - Custom Attribute handler
mike.chack Jun 7, 2005 7:04 PM (in response to mike.chack)Thanks for the reply.
I assume that the myDataHandler would just be an mbean operation of the dependant service that took the some-key as its only argument.
Is there any interest in doing this? Would this be something where you would like someone to make a contribution to the project? -
3. Re: Deployment Enhancement - Custom Attribute handler
starksm64 Jun 8, 2005 10:14 AM (in response to mike.chack)If you want to inject an attribute of the dependent target sevice then I would have a syntax like:
<mbean code="org.jboss.test.jmx.proxy.ProxyTests" name="jboss.test:name=ProxyTestsAttribute"> <depends optional-attribute-name="xxx" proxy-type="attribute" attributeName="SomeAttr">:name=ConfigService</depends> </mbean>
No handler is needed to do this.
The handler attribute type should just be some interface implementation that allows the attribute value to be obtained from the target service in whatever means it wants:interface DependentAttributeHandler { Object getAttribute(ObjectName targetService, String key); }
I would be interested in seeing such a contribution.