[jboss-as7-dev] Level for add operations
Brian Stansberry
brian.stansberry at redhat.com
Thu Jan 20 12:02:33 EST 2011
On 1/20/11 10:50 AM, Brian Stansberry wrote:
> On 1/20/11 10:06 AM, Kabir Khan wrote:
>> For the threads subsystem I register a description provider at profile => test => subsystem => threads. For that node I have an ADD_THREAD_FACTORY operation which implements ModelAddOperationHandler. I can then invoke that operation for the address profile => test => subsystem => threads to add a ThreadFactory. However, if I add more than one ThreadFactory, the last overwrites the previous, meaning I can only have one ThreadFactory.
>>
>> What I originally had in mind was to register this add handler at profile => test => subsystem => threads => threadfactory => * , but when I try to invoke the operation for the address profile => test => subsystem => threads => threadfactory => threadfactoryA it fails since the model controller does not find the operation since that node does not exist yet (that node is what I am trying to add)
>>
>
> This approach is what's intended; I'll think a bit about what the
> problem is.
>
OK, I think (hope) this is simple. The "add" operation for threadfactory
=> * needs to registered as part of the subsystem's implementation of
NewExtension.initialize(NewExtensionContext context).
The registration of all non-subsystem operations will be done statically
as part of the server, DC or HC boot. For example, init() in
https://github.com/bstansberry/jboss-as/commit/694d5b56c308fe90f6dfa7295720da836cfdc3a2#diff-10
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat
More information about the jboss-as7-dev
mailing list