geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bordet, Simone" <>
Subject RE: JMX Management Console (ObjectName hog)
Date Wed, 03 Sep 2003 08:22:23 GMT

> My guess it it is faster to use a (pre-compiled) regular 
> expression to  
> grab the chunk you are interested in out our the string 
> directly.  Last  
> I checked constructing an ObjectName was very expensive.

Yes, that used to be true.

With JMX 1.2 (and the current MX4J CVS) you can use ObjectName.getInstance("domain:key=value"),
that creates the objectname once and then caches it.
MX4J does the same caching also using the plain constructor, but using the getInstance() is
guaranteed to work with any implementation.

So, IMHO no need to use regexp.


View raw message