Hi Folks.
I have looked through the archives looking
for an answer on what to do to get the JMXConfigurator working with WebSphere.
The last entry I was able to see was from Ceki on Jun 12, 2012.
Has anyone done any further research
into this? If not, this is what I have found.
I have spent some time trying to understand
the problem. What I have been able to figure out is how to configure WebSphere
to show the Logback JMX MBean in an "unsupported" mode using
the platform MBean server.
found here (https://jazz.net/help-dev/clm/index.jsp?re=1&topic=/com.ibm.jazz.repository.web.admin.doc/topics/c_server_mon_was.html&scope=null)
Essentially, you need to configure websphere
with the following JVM arguments:
-Dcom.ibm.team.server.monitoring.mbean.server=WebSphere
-Djavax.management.builder.initial= -Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Once I did this, I was able to get jconsole to allow me to manage Logback
within WebSphere.
I would prefer to be able to use jconsole
in the supported JSR160RMI connector mode. This involves configuring websphere
with the following JVM argument:
-Dcom.ibm.team.server.monitoring.mbean.server=WebSphere
and then configuring jconsole with the
information contained in the same article in the Option 2: Setting up JMX
in JSR160RMI connector section.
When I configured WebSphere and jconsole
in this fashion, I was able to connect to an MBean server, but it did not
include the Logback bean.
With the help of a couple of coworkers,
we were able to find the following documentation:
https://www-01.ibm.com/support/knowledgecenter/SS7K4U_8.5.5/com.ibm.websphere.base.doc/ae/tjmx_standard_dynamic_mbean.html?lang=en
which indicates that WebSphere expects
that the MBean be registered as follows:
MBeanFactory mbfactory = AdminServiceFactory.getMBeanFactory();
mbfactory.activateMBean("SnoopMBean",
snoop, "snoopMBeanId", "SnoopMBean.xml");
The code I downloaded from git for Logback
shows that the JMXConfigurator uses the following:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
mbs.registerMBean(jmxConfigurator, objectName);
I was thinking that an appropriate solution
to the WebSphere problem might be to add a JVM config flag such as org.qos.logback.websphere
and if the flag is set to true, the begin() method of the JMXConfiguratorAction
class could follow the expected IBM MBean registration instead of the standard.
Opinions?
Dale Chapman,
Architect - MAAX Support
Medavie
506-867-4430
dale.chapman@medavie.bluecross.ca
-----------------------------------------------------------------------
This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal, and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply. Thank you.
La présente communication, y compris toute pièce qui y a été jointe, est destinée uniquement à la personne ou à l’entité à laquelle elle a été adressée, et contient des renseignements à caractère confidentiel et personnel. Toute diffusion ou reproduction non autorisée ou toute intervention entreprise relativement à son contenu est strictement interdite. Si vous avez reçu ce message par erreur, veuillez nous le signaler immédiatement afin que nous puissions effectuer la correction à nos dossiers. Veuillez par la suite supprimer ou détruire le contenu de la transmission originale ainsi que toute réponse ultérieure. Merci.
-----------------------------------------------------------------------