Solved

Start Servers using JMX - WebSphere Application Server

Posted on 2008-09-30
1
1,341 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

705 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now