|
From: Bordet, S. <Sim...@co...> - 2002-01-31 10:17:46
|
Hi, > > > Second question: > > > What's the best way to do this. Do a createMBean (current > > > option) or do a > > > instantiate and then a registerMBean > > > > So, I did not totally get your feature. > > You can create objects of whatever class that will be=20 > stored along with the > > http session that then you can pass to constructors or=20 > setter methods ? Or > > you just display MBeanConstructorInfo metadata ? > No session ever, never :-) > the constructor request will return the constructors for a=20 > given class (any=20 > class). Then you get a GUI for using that constructor, that=20 > is fiels to set=20 > params and an objectname. Obviously if you query for=20 > java.lang.String you=20 > will get some constructor but if you try to construct it=20 > there will be a=20 > problem because it is not an MBean Ok, so it is useful only for MBeans. > A more refined version could do the cheking beforehand Well, if you use it only for MBeans, no check: use MBeanConstructorInfo = metadata. > > Finally, unless you perform instantiate and register in 2=20 > http requests (I > > guess you don't), doing createMBean or instantiate +=20 > registerMBean is the > > same. One call is probably simpler. > Ok. I'm doing registerMBean, that's also better since if the=20 > class is not=20 > MBean it won't be instantiated, will be? No, it will be instantiated. Checks are done upon registration. You can = create whatever class with instantiate. Simon |