Couldn't we just pretend that a target MBean implemented some interface, then use the dynamic proxy api to generate something that would map the estetically clean method calls into MBeanServer.invoke() calls? The target bean could implement that inteface, but we don't really care if it does... only that it defines the appropriate methods... or MBS.invoke() won't work anyways.
It would be fairly simply to take an MBeanServer, ObjectName and inteface and generate this proxy... too bad we can't automate it a bit more... or provide the ability to just ask for anything that implemented a given interface (aka JINI) but still live in a detached world to allow for infinite plugability (aka JMX). --jason ----- Original Message ----- From: "marc fleury" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 25, 2001 10:13 PM Subject: Re: [JBoss-dev] Lookup Registry by Class > > This makes alot of sence... almost so that I wonder > > why the JMX folks did > > not make it this way from the start... perhaps the > > JINI guys wanted all the > > glory. > > Jason, I really like the "ra-ra-ra-ism" of your attitude, that being said, the JMX folks didn't do it this way for a good reason : detaching. > > the base of the microkernel is broken when you do that as you have direct references. The whole idea of JMX is to detach the invocation. > > Then JINI doesn't do that, it just provides with hard links (pointers, not objectNames) but being able to look up pointers by class is simple if you are doing typed programming and also means you don't need to pass "names" of instances to look up, just the class is sufficient. > > > > the ugly MBeanServer.invoke() calls can be done away > > with too? > > NO! (yes) > > Again those calls are important in the pure detyped, detached invocations, as it is the basis for an advanced microkernel. without these we are stuck (as everyone else) in the linked invocations and if our reference dies we have a problem. MBeanServer.invoke() is powerful. > > The bottom line is "no" we are not getting rid of MBS.Invoke() in the large "modular" parts as without it you really don't have detached programming. > > <however/> In some *sub*parts where I do want the MBeans management and singletons and lookups but I don't want the server.invoke() semantics all the time (and that catch diarreah that comes with it) then the 2 little hacks implemented in the Registry are really neat and clean and cool. > marcf > > > ______________________________________________________________________ > View this jboss-dev thread in the online forums: > http://jboss.org/forums/thread.jsp?forum=66&thread=6254 > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
