Question

1
Replies
770
Views
MANODASS Member since 2010 3 posts
Cognizant Technology Solutions
Posted: September 15, 2016
Last activity: September 15, 2016
Closed

Remote Host login for Mean Operation

Hi,

We are calling mbean operation from an activity to get listener status. Issue is, we are getting only status of listner from the node in which activity is running from. We need to get listner status from other nodes too. For this we may need to remote login to other nodes.  The code which Kevin shared in related topic  (https://mesh.pega.com/docs/DOC-81928) seems to have remote login for JBoss server. Appreciate if someone can provide a sample code to do remote login to a different node in websphere server.

Code used:
String host = "pgwasshrxx";
int port = 9999;
String urlString ="service:jmx:remoting-jmx://" + host + ":" + port;   
javax.management.remote.JMXServiceURL serviceURL = new javax.management.remote.JMXServiceURL(urlString); 
java.util.Map map = new java.util.HashMap(); 
String[] credentials = new String[] {"Test@test.com", "rules"}; 
map.put("jmx.remote.credentials", credentials); 
javax.management.remote.JMXConnector jmxConnector = javax.management.remote.JMXConnectorFactory.connect(serviceURL, map); 
javax.management.MBeanServerConnection connection = jmxConnector.getMBeanServerConnection();

Log:

2016-09-15 00:08:58,255 [    WebContainer : 0] [  STANDARD] [                    ] [        CDR:01.03.01] (eFirst_FW_Renewals_Work.Action) INFO  pgwasshr3|sv-xapp-p022.carefirst.com xxxxx - java.net.MalformedURLException: Unsupported protocol: remoting-jmx
2016-09-15 00:18:28,592 [   WebContainer : 21] [  STANDARD] [                    ] [        CDR:01.03.01] (eFirst_FW_Renewals_Work.Action) INFO  pgwasshr3|sv-xapp-p022.carefirst.com xxxxx- java.net.MalformedURLException: Unsupported protocol: remoting-jmx
2016-09-15 00:24:54,239 [   WebContainer : 32] [  STANDARD] [                    ] [        CDR:01.03.01] (eFirst_FW_Renewals_Work.Action) INFO  pgwasshr3|sv-xapp-p022.carefirst.com xxxxx - java.net.MalformedURLException: Unsupported protocol: remoting-jmx

Data Integration Data Integration Java and Activities
Moderation Team has archived post
Share this page LinkedIn