Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMXProxy from JBoss to Tomcat

I have multiple Tomcats and one JBoss.

In JBoss i like to proxy about 100 Tomcat's JMX-Beans using "JRMPProxyFactory". I have all the interfaces in jboss but i dont know where i have to add the Tomcat's ip-addresses.

This is my tomcat99-service.xml:

<?xml version="1.0" encoding="UTF-8"?>
<server>
   <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
      name="jboss.jmx:type=adaptor,name=Remote,protocol=jrmp,service=proxyFactory">
      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
      <depends optional-attribute-name="TargetName">tomcat99:service=JMX</depends>
      <attribute name="JndiName">Tomcat99Target</attribute>
      <attribute name="InvokeTargetMethod">true</attribute>
      <attribute name="ExportedInterfaces">myinterface</attribute>
   </mbean>
</server>
like image 790
Grim Avatar asked Jan 23 '14 15:01

Grim


1 Answers

As far as I know, JRMPProxyFactory uses normal MBeans found using the normal ObjectName rules. You don't need to configure any IP addresses, except in your client MBean definitions. If your tomcats are remote, then you should use JMXRemote to delegate to the remote MBeans, and enable JMXRemote in each of your tomcats.

You could use tomcat's own proxy servlet for a lighter-weight alternative which doesn't require a local client in JBoss.

You're probably not using Mule, but their page The Pros and Cons of Using Tomcat JMX does contain quite a few pointers and, of course, some pros and cons.

like image 107
Paul Hicks Avatar answered Oct 22 '22 05:10

Paul Hicks