Re: howto extend catalina with mbeans

2002-11-21 Thread Jakob Praher
Am Don, 2002-11-21 um 19.29 schrieb Costin Manolache:
 The solution is not yet very well defined. 
yup. I have experienced the same.

 
 Right now catalina can be extended with Valves or connectors or listeners.
 Some of them  (like jk connector ) can define MBeans. The major problem
 is having the admin interface recognize them - it should work
 but I never tried.

I'll have to look at them.

I only know that the default mbeans are plugged in with a
lifecyclelistener.

 
 I already committed some code to modeler to allow modules to 
 have their own modeler description ( in META-INF/modeler-mbean.xml )
 and have it loaded automatically using getResources(). The code
 is not yet used, but will probably be for 5.0 ( or I hope so ).
 But if you implement your own mbean - you can register them yourself.
 

ok. would be interesting to see what the avalon project is doing in this
direction - they have management extensions for their containers.

but I like the idea of beeing able to add MBeans to webapps.
where is your code located in the jakarta-modeller source tree ?

 The only important thing is to get the MBeanServer using the same 
 mechanisms ( i.e. get existing instead of creating new one ).
 
don't know exactly what you mean by this ... 

 Also note that there are discussions on using modeler mbean to implement
 config changes ( it is not yet clear what's the best solution ), that
 may affect the support for custom mbeans.
 
sounds interesting.

 Another issue that wasn't much discussed is having mechanisms to
 use mbeans as extensions ( hooks, etc) - and use the mbean lifecycle
 and naming as a registration ( or alternatively, use a JNDI/JMX combination 
 - the big problem with JMX is that you can't get the real object, all
 calls must be made via mbean server)

yes that's the tradeof. this makes JMX so powerful ( no direct
references ) but it can make things slow ...

one thing I could imagine is to go both directions:

a) via MBeans 
b) via plain java interfaces ...


thanks very much for your help 

-- Jakob

 
 Costin
 
 
 
 Jakob Praher wrote:
 
  hi all,
  
  first of all kudos for the 4.1.x release - working with jmx is simply
  great ;-)
  
  I have a question, how to best extend catalina through jmx:
  
  for instance I have a special connector mbean or adaptor mbean, that I
  want to load into catalina.
  
  is there a way (for instance in the server.xml configuration file) to
  laod this mbean during startup ?
  
  if not: what is the best way to plug in a third party mbean into
  catalina ?
  
  should I write a custom lifecyclelistener?
  
  thanks
  
  -- Jakob
  the best way to predict the future ist to invent it -- Alan Kay
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: howto extend catalina with mbeans

2002-11-21 Thread Jakob Praher
Am Don, 2002-11-21 um 19.29 schrieb Costin Manolache:
 The solution is not yet very well defined. 
yup. I have experienced the same.

 
 Right now catalina can be extended with Valves or connectors or listeners.
 Some of them  (like jk connector ) can define MBeans. The major problem
 is having the admin interface recognize them - it should work
 but I never tried.

I'll have to look at them.

I only know that the default mbeans are plugged in with a
lifecyclelistener.

 
 I already committed some code to modeler to allow modules to 
 have their own modeler description ( in META-INF/modeler-mbean.xml )
 and have it loaded automatically using getResources(). The code
 is not yet used, but will probably be for 5.0 ( or I hope so ).
 But if you implement your own mbean - you can register them yourself.
 

ok. would be interesting to see what the avalon project is doing in this
direction - they have management extensions for their containers.

but I like the idea of beeing able to add MBeans to webapps.
where is your code located in the jakarta-modeller source tree ?

 The only important thing is to get the MBeanServer using the same 
 mechanisms ( i.e. get existing instead of creating new one ).
 
don't know exactly what you mean by this ... 

 Also note that there are discussions on using modeler mbean to implement
 config changes ( it is not yet clear what's the best solution ), that
 may affect the support for custom mbeans.
 
sounds interesting.

 Another issue that wasn't much discussed is having mechanisms to
 use mbeans as extensions ( hooks, etc) - and use the mbean lifecycle
 and naming as a registration ( or alternatively, use a JNDI/JMX combination 
 - the big problem with JMX is that you can't get the real object, all
 calls must be made via mbean server)

yes that's the tradeof. this makes JMX so powerful ( no direct
references ) but it can make things slow ...

one thing I could imagine is to go both directions:

a) via MBeans 
b) via plain java interfaces ...


thanks very much for your help 

-- Jakob

 
 Costin
 
 
 
 Jakob Praher wrote:
 
  hi all,
  
  first of all kudos for the 4.1.x release - working with jmx is simply
  great ;-)
  
  I have a question, how to best extend catalina through jmx:
  
  for instance I have a special connector mbean or adaptor mbean, that I
  want to load into catalina.
  
  is there a way (for instance in the server.xml configuration file) to
  laod this mbean during startup ?
  
  if not: what is the best way to plug in a third party mbean into
  catalina ?
  
  should I write a custom lifecyclelistener?
  
  thanks
  
  -- Jakob
  the best way to predict the future ist to invent it -- Alan Kay
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




jmx and context administration

2002-10-08 Thread Jakob Praher

hi all,

currently I am working with tomcat-4.1-cvs-head and mx4j.
I have looked at the org.apache.catalina.mbeans package but couldn't
find a MBean or a Method for adding contexts to a catalina host entry.

What I want to do is stop start and add a context to catalina during
runtime w/ JMX, as I have some huge context I want to enable on demand.

- is this feature currently implemented?
- is anybody working on implementing a feature like that?
- is catalina capable of dynamic context unloading ( i think so, as
AFAIR the manager privileged context is able to do this  )
- are you planing on implementing a jmx/connector to connect to jmx via
rmi or something like this?

thanks 

-- Jakob







--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




jmx and context administration

2002-10-08 Thread Jakob Praher

hi all,

currently I am working with tomcat-4.1-cvs-head and mx4j.
I have looked at the org.apache.catalina.mbeans package but couldn't
find a MBean or a Method for adding contexts to a catalina host entry.

What I want to do is stop start and add a context to catalina during
runtime w/ JMX, as I have some huge context I want to enable on demand.

- is this feature currently implemented?
- is anybody working on implementing a feature like that?
- is catalina capable of dynamic context unloading ( i think so, as
AFAIR the manager privileged context is able to do this  )
- are you planing on implementing a jmx/connector to connect to jmx via
rmi or something like this?

thanks 

-- Jakob






--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]