On 3/14/13 9:55 AM, Jeff Mesnil wrote:
Le 13 mars 2013 à 18:43, Brian Stansberry <brian.stansberry(a)redhat.com> a écrit :
> The management resources do exist though. They represent configuration,
> which exists and needs to be manageable.
>
> Is the problem with the various runtime-only attributes and operations
> that are exposed by the resources? There's no mechanism to hide those in
> the API or flag that they are unavailable if some condition doesn't hold
> (e.g. some new attribute 'active' == true)?
yes, that's simpler this way: for each runtime attr and operations, I check whether
the underlying hornetq server is active.
if that's not the case, I ignore the read-attribute (returning undefined) and fail
the operations.
For AS 9 we need to figure out how to represent this in the metadata,
particularly for the operations.
One thing we've done is registering overrides in the
ManagementResourceRegistration. So, the registration for hornetqserver=*
includes no runtime stuff and then when a specific resource becomes
live, an override registration for hornetqserver=specific_name is done
that exposes all the runtime stuff.
It's pretty nasty though. I don't think we should try and apply that
technique to this case.
I also have to make sure that AS7 service depending on HornetQ
(topic, queue and cf services) are not started until it becomes active.
I install them in NEVER mode and switch them to ACTIVE if HornetQ server fails over and
becomes active.
thanks,
jeff
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat