ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lamey" <cla...@localmatters.com>
Subject RE: [OT sort of] If using Tomcat, what would you use to hook into slqlmapclient flushDataCache (and change logging)?
Date Sat, 27 Dec 2008 17:30:09 GMT
That's the first link that comes up on Google if you search for "tomcat mbeans".

;)

Now that I re-read it, that is a very old doc and you're probably better off reading the current
Tomcat docs:

    http://tomcat.apache.org/tomcat-5.5-doc/mbeans-descriptor-howto.html

Since Tomcat uses JMX now, I don't think there's a lot of JMX setup to do nowadays:

    http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html

And yes, common/lib is effectively in the webapp's classpath.  It is 'common' to all webapps.

-----Original Message-----
From: Rick [mailto:rickcr@gmail.com]
Sent: Fri 12/26/2008 3:19 PM
To: user-java@ibatis.apache.org
Subject: Re: [OT sort of] If using Tomcat, what would you use to hook into slqlmapclient flushDataCache
(and change logging)?
 
It's funny that link you posted is the ONLY link anyone ever posts or
talks about:)

What I don't understand about what that link describes is that it
mentions all your mbeans should be in its own jar and deployed into
tomcat's common/lib.  I take it then you just compile the jar against
your webapp code and that the deployed jar will just "work" without
classpath errors? the mbeans obviously will need hooks into the
classpath of my webapp itself. I guess that just works its way out
when you deploy to common/lib ?


On Fri, Dec 26, 2008 at 5:09 PM, Chris Lamey <clamey@localmatters.com> wrote:
> We have some apps that use a page with a button on it and other apps that
> use JMX for flushing the cache.  It depends on who wants to flush the
> cache.  If it's an ops group and there are other JMX things they're
> watching/using, JMX can be good.  If it's a user group, then a UI would
> might be better (having end users use jconsole seems painful in several
> ways).
>
> Implementing your own MBean in Tomcat is not as trivial as it is in JBoss,
> but doesn't take much:
>
>     http://oss.wxnet.org/mbeans.html
>
> I think you can configure log4j to watch the config file and read changes on
> the fly.  Check out ReloadingPropertyConfigurator and/or
> PropertyConfigurator.configureAndWatch() to start.
>
> -----Original Message-----
> From: Rick [mailto:rickcr@gmail.com]
> Sent: Fri 12/26/2008 1:38 PM
> To: user-java@ibatis.apache.org
> Subject: [OT sort of] If using Tomcat, what would you use to hook into
> slqlmapclient flushDataCache (and change logging)?
>
> In this current Tomcat web app I'm going to need a way to A) switch
> the logging level of the webapp on the fly (from info/warn to maybe
> debug) and B) a way to manually flush all ibatis caches without
> restarting the application.  I see a SqlMapClient implementation has a
> flushDataCache method to flush the complete cache.
>
> I'm curious, though, what you guys that have worked with Tomcat use to
> help in these tasks? JMX/MBeans are easy with JBoss but when briefly
> researching this for Tomcat I amazed at the lack of documentation and
> examples. Because the information is so sparse, I'm assuming people
> create hooks into their app by other means? Is the easiest just to
> create some protected admin page as part of your webapp and just hook
> into a servlet to make the calls?
>
> What is the approach most take when they want to accomplish the above
> tasks using a simple appserver?
>
> Thanks
>
> --
> Rick
>
>
>



-- 
Rick



Mime
View raw message