Solved

Start Servers using JMX - WebSphere Application Server

Posted on 2008-09-30
1
1,358 Views
Last Modified: 2013-12-11
Hello,
I would like to start WAS servers from a remote location for which I think JMX is the best way to do so. But , when I try to query:
 ObjectName QueryName = new ObjectName("WebSphere:*,type=server") - doesnt include the stopped server information , which is proably because the requested objects are not created yet.
Can some one please advice how to implement this...
Thanks
0
Comment
Question by:sravy
1 Comment
 
LVL 1

Accepted Solution

by:
sravy earned 0 total points
ID: 22652562
try
        {
                  String host = "host";
                  String port = "port";
                  String opName = "launchProcess";
                  String signature[] = { "java.lang.String"};
                  Object params[] = { "servername"};

            Properties config = new Properties();
                  config.put (AdminClient.CONNECTOR_HOST,  host);
                  config.put (AdminClient.CONNECTOR_PORT,  port);
                  config.put (AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
                    AdminClient _soapClient = AdminClientFactory.createAdminClient(config);

                  ObjectName m_oQueryName = new ObjectName("WebSphere:*,type=NodeAgent");
                  Set m_oAllNamesSet = _soapClient.queryNames(m_oQueryName, null);
                  if(m_oAllNamesSet != null)
                  {
                        Iterator m_oIter = m_oAllNamesSet.iterator();
                        while(m_oIter.hasNext())
                        {
                              ObjectName m_node = (ObjectName)m_oIter.next();
                              String m_nodeName = (String)(m_node.getKeyProperty("node"));
                             _soapClient.invoke(m_node, opName, params, signature);
                        }
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question