Question

1
Replies
774
Views
Manoranjan Thangaraj (MANODASS)
Cognizant Technology Solutions
Lead System Architect
Cognizant Technology Solutions
US
MANODASS Member since 2010 3 posts
Cognizant Technology Solutions
Posted: September 15, 2016
Last activity: September 15, 2016
Posted: 15 Sep 2016 12:08 EDT
Last activity: 15 Sep 2016 12:47 EDT
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:

Show More

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

Show Less
Data Integration Java and Activities
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.