You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by co...@covalent.net on 2002/07/29 22:51:03 UTC
[modeler] Use existing server
There is a problem when the modeler is used togheter with dynamic
or static mbeans ( that don't use modeler ). The problem is that
modeler will _create_ an mbean server, and those other beans will
use a different server.
Here's the patch, let me know if it's ok:
Costin
Index: src/java/org/apache/commons/modeler/Registry.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/Registry.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Registry.java
--- src/java/org/apache/commons/modeler/Registry.java 30 Apr 2002
20:58:52 -0000 1.1.1.1
+++ src/java/org/apache/commons/modeler/Registry.java 29 Jul 2002
20:27:52 -0000
@@ -241,8 +241,13 @@
public synchronized static MBeanServer getServer() {
if (server == null) {
- log.info("Creating MBeanServer");
- server = MBeanServerFactory.createMBeanServer();
+ if( MBeanServerFactory.findMBeanServer(null).size() > 0 ) {
+ log.info("Using existing MBeanServer");
+
server=(MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
+ } else {
+ log.info("Creating MBeanServer");
+ server=MBeanServerFactory.createMBeanServer();
+ }
}
return (server);
Costin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [digester][beanutils] release plan...?
Posted by robert burrell donkin <ro...@mac.com>.
On Monday, July 29, 2002, at 10:49 PM, Craig R. McClanahan wrote:
> On Mon, 29 Jul 2002, robert burrell donkin wrote:
<snip>
>> what work needs to be done before we can think about releasing...?
>
> Last time I checked (a couple of days ago), there weren't any outstanding
> bug reports against either.
there is one but the problem is that the reporter posted to me personally
explaining that he didn't have time to provide the extra information i
wanted. the problem is that the bug is reported against code that has
definitely changed since the last release and fixes have been made to it.
i suppose that i could try to find some time to have a look at the unit
tests and at the patch he posted. the problem is that the description's
very vague...
- robert
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [digester][beanutils] release plan...?
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 29 Jul 2002, robert burrell donkin wrote:
> Date: Mon, 29 Jul 2002 22:21:59 +0100
> From: robert burrell donkin <ro...@mac.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: [digester][beanutils] release plan...?
>
> i'd like to push towards releases of digester and beanutils.
>
> there's been some functionality added but a lot of bug fixes made to
> digester since the last release (april). i think it's time that we had
> another.
>
> digester relies on new functionality and bug fixes in beanutils and so a
> release of beanutils is also required. equally importantly, i think that
> a beanutils release is need before we can consider the issue of reflection.
>
> what work needs to be done before we can think about releasing...?
>
Last time I checked (a couple of days ago), there weren't any outstanding
bug reports against either. And, as far as I know, I've done all the
changes to beanutils and digester that I think I need for Struts 1.1-b2,
so I'm +1 on a release in the near term.
The only real work remaining is to comb through the commit messages and
create the release notes.
> - robert
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
[digester][beanutils] release plan...?
Posted by robert burrell donkin <ro...@mac.com>.
i'd like to push towards releases of digester and beanutils.
there's been some functionality added but a lot of bug fixes made to
digester since the last release (april). i think it's time that we had
another.
digester relies on new functionality and bug fixes in beanutils and so a
release of beanutils is also required. equally importantly, i think that
a beanutils release is need before we can consider the issue of reflection.
what work needs to be done before we can think about releasing...?
- robert
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [modeler] Use existing server
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 29 Jul 2002 costinm@covalent.net wrote:
> Date: Mon, 29 Jul 2002 15:15:15 -0700 (PDT)
> From: costinm@covalent.net
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: Re: [modeler] Use existing server
>
> On Mon, 29 Jul 2002, Craig R. McClanahan wrote:
>
> > > There is a problem when the modeler is used togheter with dynamic
> > > or static mbeans ( that don't use modeler ). The problem is that
> > > modeler will _create_ an mbean server, and those other beans will
> > > use a different server.
> > >
> > > Here's the patch, let me know if it's ok:
> > >
> >
> > +1, but of course it will only work if every other user of JMX follows the
> > same algorithm. Maybe we need some sort of mini-discovery goodie?
>
> I think findMBeanServer(null) is already a discovery mechanism -
> and it's up to each JMX user to play nice.
>
> > Can you go ahead and apply it (so I can hook you on doing some other
> > improvements on Modeler later :-)?
>
> Ok.
>
> One improvement I would like is merging the introspection-based
> dynamic mbean in tomcat.util.mx.
>
> I.e. instead of using XML it should be possible to use the
> reflection-based info ( or use both ).
>
> That would make jmx-enabling a component much simpler - no
> need to edit the xml file for each component ( unless you
> want to add description or explicitely select the exposed
> methods ).
>
Agreed that having both kinds of support would be good.
> Costin
>
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [modeler] Use existing server
Posted by co...@covalent.net.
On Mon, 29 Jul 2002, Craig R. McClanahan wrote:
> > There is a problem when the modeler is used togheter with dynamic
> > or static mbeans ( that don't use modeler ). The problem is that
> > modeler will _create_ an mbean server, and those other beans will
> > use a different server.
> >
> > Here's the patch, let me know if it's ok:
> >
>
> +1, but of course it will only work if every other user of JMX follows the
> same algorithm. Maybe we need some sort of mini-discovery goodie?
I think findMBeanServer(null) is already a discovery mechanism -
and it's up to each JMX user to play nice.
> Can you go ahead and apply it (so I can hook you on doing some other
> improvements on Modeler later :-)?
Ok.
One improvement I would like is merging the introspection-based
dynamic mbean in tomcat.util.mx.
I.e. instead of using XML it should be possible to use the
reflection-based info ( or use both ).
That would make jmx-enabling a component much simpler - no
need to edit the xml file for each component ( unless you
want to add description or explicitely select the exposed
methods ).
Costin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [modeler] Use existing server
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 29 Jul 2002 costinm@covalent.net wrote:
> Date: Mon, 29 Jul 2002 13:51:03 -0700 (PDT)
> From: costinm@covalent.net
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: [modeler] Use existing server
>
>
> There is a problem when the modeler is used togheter with dynamic
> or static mbeans ( that don't use modeler ). The problem is that
> modeler will _create_ an mbean server, and those other beans will
> use a different server.
>
> Here's the patch, let me know if it's ok:
>
+1, but of course it will only work if every other user of JMX follows the
same algorithm. Maybe we need some sort of mini-discovery goodie?
Can you go ahead and apply it (so I can hook you on doing some other
improvements on Modeler later :-)?
> Costin
Craig
>
> Index: src/java/org/apache/commons/modeler/Registry.java
> ===================================================================
> RCS file:
> /home/cvs/jakarta-commons/modeler/src/java/org/apache/commons/modeler/Registry.java,v
> retrieving revision 1.1.1.1
> diff -u -r1.1.1.1 Registry.java
> --- src/java/org/apache/commons/modeler/Registry.java 30 Apr 2002
> 20:58:52 -0000 1.1.1.1
> +++ src/java/org/apache/commons/modeler/Registry.java 29 Jul 2002
> 20:27:52 -0000
> @@ -241,8 +241,13 @@
> public synchronized static MBeanServer getServer() {
>
> if (server == null) {
> - log.info("Creating MBeanServer");
> - server = MBeanServerFactory.createMBeanServer();
> + if( MBeanServerFactory.findMBeanServer(null).size() > 0 ) {
> + log.info("Using existing MBeanServer");
> +
> server=(MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
> + } else {
> + log.info("Creating MBeanServer");
> + server=MBeanServerFactory.createMBeanServer();
> + }
> }
> return (server);
>
> Costin
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>