If I understand it correctly, objects returned from the 
MLet.getMBeansFromURL() call are just object names, but you need to get 
your hands and cluster the actual instances that are proxied by JMX. If 
you completely delegate object creation to JMX factories (MLet, 
MBeanServer, etc), then it will be hard to get the objects. I took a 
quick look at Sun's JMX implementation included into Java 5 and later. 
Its javax.management.MBeanServer.createMBean() implementation (which is 
called by MLet) delegates to some internal classes and only those 
internal classes have collections of the real objects.

  regards,
  Eugene


Jason Chaffee wrote:
> I have attached the LoggingMBean interface and the javadoc should be
> self-explanatory.  We have a custom mlet (see beolow), that we load and
> figure out the class and ObjectName and then we use the MBeanServer
> api's to instantiate and register the MBean.  We use the container's
> MBeanServer for deployed apps in that instance, in this case it is
> Tomcat.  For example,
>
> <MLET archive="dummy.jar" code="com.foo.Logging"
> name="tvworks:app=test,name=Logging,type=Logging"/>
>
> javax.management.loading.MLet.getMBeansFromURL(String url);
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Eugene
> Kuleshov
> Sent: Tuesday, October 23, 2007 2:25 PM
> To: [email protected]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [tc-dev] [tc-users] How to cluster MBeans
>
>
>   Most likely yes. Would you mind to create a small app that will show 
> how you create and use Logging
> and LoggingMBean? It will be easier to figure out what could be done
> then.
>
>   regards,
>   Eugene
>
>
>   

_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to