<font size=2 face="sans-serif">bump</font>
<br>
<br><font size=2 face="sans-serif"><br>
Thanks,<br>
-Chris<br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Christopher.White@bbh.com</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">logback users list
<logback-user@qos.ch></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">03/05/2012 02:31 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[logback-user]
JMX on a WebSphere clustered environment</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">logback-user-bounces@qos.ch</font>
<br>
<hr noshade>
<br>
<br>
<br><font size=2 face="sans-serif">Hi,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I'm trying to use Logback JMX in my application to allow me to change the
configuration at runtime.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
I've created client code that can retrieve the JMX bean, and am able to
invoke the JMX bean to get/set logging levels. </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
This works just fine on one single server. However, my application is deployed
on a cluster of two servers. When invoking the JMXConfigurator, it only
modifies the logging configuration on the particular server that I happened
to connect to for that http request, but does not modify the configuration
on the other clustered server.</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
Am I missing something, or is there no way to have one JMX call update
the logback configuration on all clustered servers? Am I perhaps retrieving
the JMX bean incorrectly for a clustered environment? Any help would be
greatly appreciated.</font><font size=3> <br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
Here is the client code I am using to access the JMX bean:</font><font size=3>
<br>
</font><font size=2 face="Courier New"><br>
String contextName = "myContextName";</font><font size=3> </font><font size=2 face="Courier New"><br>
String objectNameStr = ch.qos.logback.classic.jmx.MBeanUtil.getObjectNameFor(contextName,
JMXConfigurator.class);</font><font size=3> </font><font size=2 face="Courier New"><br>
javax.management.ObjectName objectName = new javax.management.ObjectName(objectNameStr);</font><font size=3>
</font><font size=2 face="Courier New"><br>
javax.management.MBeanServer mbs = java.lang.management.ManagementFactory.getPlatformMBeanServer();</font><font size=3>
</font><font size=2 face="Courier New"><br>
mbean = javax.management.JMX.newMBeanProxy(mbs, objectName, JMXConfiguratorMBean.class,
true);</font><font size=3> </font><font size=2 face="Courier New"><br>
mbean.setLoggerLevel("myLogger", "debug");</font><font size=3>
<br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
<br>
Thanks,<br>
-Chris</font><font size=3> *************************** IMPORTANT NOTE*****************************--
The opinions expressed in this message and/or any attachments are those
of the author and not necessarily those of Brown Brothers Harriman &
Co., its subsidiaries and affiliates ("BBH"). There is no guarantee
that this message is either private or confidential, and it may have been
altered by unauthorized sources without your or our knowledge. Nothing
in the message is capable or intended to create any legally binding obligations
on either party and it is not intended to provide legal advice. BBH accepts
no responsibility for loss or damage from its use, including damage from
virus. ********************************************************************************</font><tt><font size=2>_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
</font></tt><a href="http://mailman.qos.ch/mailman/listinfo/logback-user"><tt><font size=2>http://mailman.qos.ch/mailman/listinfo/logback-user</font></tt></a>
<br>
*************************** IMPORTANT
NOTE*****************************-- The opinions expressed in this
message and/or any attachments are those of the author and not
necessarily those of Brown Brothers Harriman & Co., its
subsidiaries and affiliates ("BBH"). There is no guarantee that
this message is either private or confidential, and it may have
been altered by unauthorized sources without your or our knowledge.
Nothing in the message is capable or intended to create any legally
binding obligations on either party and it is not intended to
provide legal advice. BBH accepts no responsibility for loss or
damage from its use, including damage from virus.
********************************************************************************