This content has been marked as final.
Show 1 reply
-
1. Re: Getting Ref to MBean
davidjencks Feb 18, 2002 11:59 PM (in response to sgturner)Mbeans don't need to have any relationship with jndi whatsoever. However, if you need to avoid exposing some of your methods as managed operations or attributes, you will have to find some way of locating the instance. Jndi is certainly one way, and you are free to write your own ObjectFactory to bind your mbean.
Another approach is to include a getMySelf managed attribute that returns the mbean instance itself. Then you can fetch the instance through jmx.
A third approach is to rethink "management" and decide to expose all the methods you want "public" as managed attributes and operations.