Lloyd Chambers wrote:
OK, thanks.
Yes, it's fine to register them prior to the parent existing,
but once AMX loads, it will want the correct behavior from getParent().
There is a potential race condition: AMX starts the validation
thread as soon as DomainRoot and its immediate children load.
If the parent is an MBean that is not yet registered by the time
the validation thread checks, then validation would fail, because the
parent would not be found.
Lloyd
But that means that gmbal (or any other SW creating AMX beans) must
have registered a child BEFORE it registered the parent,
otherwise how could your validation thread find the child first? Gmbal
should mostly prevent this, because the only way to register is as
follows:
- You can create a root, which (in GFv3) will be the child of the
ObjectName passed into createFederated (is this always Domain root? If
not, there could be a problem here)
- You can call registerAtRoot, but only AFTER creating a root.
- You can call register( parent, child ), which will only succeed
if the parent is already registered.
I suppose it MIGHT be possible to do something like
DomainRoot -> gmbalroot -> gmbal children
and have a situation where DomainRoot and gmbalroot are BOTH managed
outside of Gmbal, in which case
gmbal won't prevent the problem, and it might be possible to register
gmbalroot before DomainRoot. But I suspect
this case should go through utilities that you control, which would
prevent this.
Ken.