From: Liu, K. A. (Kenneth)** C. ** <ke...@lu...> - 2001-03-29 23:49:46
|
So I created a ServiceMBean for my system, and now I am ready to create a client to it. This particular MBean initializes and starts an engine that I am using and holds on to the instance of it. I would now like to access this instance. What I've done is created a getInstance() on the MBean's interface and implementation which returns an instance of the engine. Is it preferred to access an MBean by using the management API to invoke the method, or is it better to go some other route (perhaps by placing the engine in JNDI). I am having some difficulty understanding whether the JMX APIs should really be preferred only for "management" code, or if it should be used for general application development (i.e. servlets and EJBs or POJOs). Ken |