|
From: Carlos Q. <car...@ge...> - 2002-01-28 16:21:27
|
>Hi,
>
>> >Hi,
>> >
>> >> Then, what's the correct way? via
>> >> server.setAttribute("ManagedResource",
>> >> object)
>> >
>> >No, there is no way to do it via MBeanServer.
>> >
>> >You must call it directly on the ModelMBean reference.
>>
>> But you should create the ModelMBean via MBeanServer, how can
>> you access the instance then?
>
>ModelMBean rmmb =3D
> server.instantiate("javax.management.modelmbean.RequiredModelMBean", ..=
=2E);
> rmmb.setModelMBeanInfo(...);
>rmmb.setManagedResource(..., "ObjectReference");
>server.registerMBean(rmmb, ...);
>
>No other way.
>
>The first line may be:
>
>ModelMBean rmmb =3D new RequiredModelMBean();
>
>but the rest is mandated.
>See also the tests for examples.
Ok, thanks for the clarification. it still feels a bit counterintuitive t=
hough
Simon
_______________________________________________
Openjmx-devel mailing list
Ope...@li...
https://lists.sourceforge.net/lists/listinfo/openjmx-devel
|