JBOSS EAP 6 JMX MBeans via rmi - jboss7.x

I am kind of new to JMX , Here I am trying to use jconsole provided by jdk to remotely read the MBeans of JBOSS EAP 6. I followed tutorial ,http://magnus-k-karlsson.blogspot.in/2013/01/how-to-remote-connect-jconsole-to-jboss.html with this I am able to read remotely with the jconsole provided by eap 6 (EAP6_HOME)/bin/jconsole.sh ,but I was not able to do the same with jconsole of jdk ? Please give your thought on this. I suspect it may be due to the remoting-jmx protocol of the (service:jmx:remoting-jmx://192.168.0.3:9999 ) jmx remote url. Does jboss-eap6 support rmi(service:jmx:rmi:///jndi/rmi://ipadress/mbeanname) protocol to read MBeans in jconsole?
Thanks,
Leo.

By default, there will be a MBeans tab in the window of jconsole when connected as :
service:jmx:remoting-jmx://jbossHost:9999

To be able to use remoting-jmx protocol you need to have jboss-client.jar or jboss-cli-client.jar on the JConsole classpath.
Here is the relevant part from jconsole.sh provided by JBoss:
CLASSPATH=$JAVA_HOME/lib/jconsole.jar
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
CLASSPATH="$CLASSPATH:$JBOSS_HOME/bin/client/jboss-cli-client.jar"
$JAVA_HOME/bin/jconsole -J-Djava.class.path="$CLASSPATH" "$#"
P.S. You might need to create some user account first. See $JBOSS_HOME/bin/add-user.sh

Related

JMX Connection to Mule 4 Project running Locally

How do you connect a JMX agent to a Mule 4 project running locally? When I launch JConsole I see two mule-related processes called org.mule.runtime.module.reboot.MuleContainerBootstrap but I cannot connect to either.
I've tried running my project with the following flags and connecting remotely:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.host=localhost
But no luck.
I had no problems connecting to (localhost:1096) using just these properties:
-Dcom.sun.management.jmxremote.port=1096
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
JConsole gave me a warning about the insecure connection (no SSL). I accepted to connect insecurely and that was enough.
However when adding -Dcom.sun.management.jmxremote.host=localhost is keeps failing to connect. This looks like a Java issue.
If you only want to ensure local connections you can replace it with -Dcom.sun.management.jmxremote.local.only=true which should give you the expected result.
Having said that, this is all a pure Java JMX topic. Mule 4 doesn't expose any MBeans over JMX like Mule 3 did so there is no specific reason to connect with JMX.
I'm not sure why you are using jconsole given that VisualVM is a much modern and powerful alternative, unless you are just testing the local JMX connectivity ;-)

Mule 3.7CE enabling jmx

i'm trying to get JMX monitoring to work on a Mule 3.7 CE server.
I've got a flow with
<management:jmx-server >
<management:connector-server url="service:jmx:rmi:///jndi/rmi://my-server:1099/server" rebind="false" />
</management:jmx-server>
when i deploy the app it get this error
Failed to deploy artifact 'jmx_ce37', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ org.mule.module.launcher.DeploymentInitException:
RegistrationException: More than one object of type class
org.mule.module.management.agent.AbstractJmxAgent registered but only
one expected. at
org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:197)
~[?:?]
I would assume that there's already some jmx process running; but i didn't enable it, and i don't know how to connect to it. There are no processes listening on the default jmx port (1096) on this machine.
Any suggestions on what to do to use jmx with Mule3.7CE ?
Mule server already provides indeed a JMX server with basic statistics around the server and the applications, please try and use a different port if the default out-of-the-box behaviuor does not work for you.

Jboss Mbeans visible in jmx-console but not in JConsole

JBoss(4.0.x) has many useful MBeans (org.apache.commons.modeler.*) that are visible in:
/jmx-console
But i cannot see these beans listed in JConsole (MBeans tab).
Are these beans not exposed to outside world?
JBoss 4.x has its own internal MBean server, separate from the default JVM one (JBoss AS 4.x pre-dates Java 5 and its MBean server, so needed its own).
I believe that in JBoss AS 5.x you can tell it to use the JVM's MBean server, but I don't think JBoss AS 4.x provides that option.
Are these beans not exposed to outside world?
Yes they are - JBoss AS's internal MBean server is just as exposed as the JVM's one, it's just exposed differently. JConsole talks to the JVM's MBean server, you need different tools to talk to the JBoss AS one.
P.S. JBoss AS 4.0 is eye-poppingly old (2004? 2005?). You really should update it.

Setting up WebSphere MQ integration in a WebLogic clustered environment

I have a WebLogic cluster up and running an application containing an MDB. I'm currently using WebLogic JMS queues to send messages to the MDB. All is well.
I now have need to switch to IBM WebSphere MQ for my JMS messaging.
I can set this up and send/receive messages in a non-clustered environment (Admin server) using a Foreign server with a bindings file. However, I can't seem to properly configure the clustered environment for MQ integration to work correctly.
I get the following when deploying the EAR/MDB on the cluster:
The Message-Driven EJB: xxxMDB is unable to connect to the JMS destination...
javax.naming.NameNotFoundException: Unable to resolve 'jms.xxxQueue'
Can anyone point me to some documentation on how to configure IBM WebSphere MQ in a WebLogic cluster?
Thanks!
there is a need to add several MQ JMS classes to the PATH of the weblogic so it will be able to connect to MQ
the path needed to be added is : *MQ_system_path*/java/lib64
beside that here are the clasess i have found that are needed to make this thing :
com.ibm.mq.mqi.jar; com.ibm.mq.headers.jar; com.ibm.mq.jar; commonservices.jar; com.ibm.mq.jms.jar;jta.jar;
this what helped us to connect weblogic to MQ
regards
Oren yeger

Start/stop a deployment in Weblogic 9 using JMX (or WLST)

I want to start/stop a deployment in weblogic 9 server.
I prefer to use JMX to talk to a weblogic MBean. I already use this to start/stop a server, but I cannot find the MBean for starting/stopping deployments/applications.
In weblogic server 11g there is a AppDeploymentRuntimeMBean which can stop/start deployments. That is described here:
http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e13951/mbeans/AppDeploymentRuntimeMBean.html
But I cannot find a simular MBean in weblogic 9
http://download.oracle.com/docs/cd/E13222_01/wls/docs92/wlsmbeanref/core/index.html
Is there a way to start/stop a weblogic 9 deployment using jmx or wlst?
BTW, when I record a WLST-script during start/stop of a deployment the pyton-script is empty.
Well actually AppDeploymentRuntimeMBean was first introduced in WLS 10.3 version. And this bean along with DeploymentManagerMBean were created to replace DeployerRuntimeMBean (it is considered deprecated since 9.0.0.0 version). As for me it seems that there is no way to start\stop applications with JMX on WLS 9 unless you decide to use deprecated API. And also consider the fact that you need Administration Server running in order to access Domain Runtime MBean Server that will provide an entry point to DeployerRuntimeMBean.