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/694d5b56c308fe90f6dfa72957...
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat