Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

What are the JMXconfiguration required in WAS5.0 to get AdminClient/Sample Pmirm.xml

 
Bala Dakshin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am using JMX mBeans in WebSphere5.0 with JDK1.4.
am getting runtime exception, when I am trying to
access mBeans through 2 approaches
My Requirement is restart the MQListener in WAS5.0 Programmatically using JMX without restarting the Server
1)If you have any sample configured Pmirm.xml that will help me to get rid of my PmiClient Creation Exception at runtime
2)What are the configuration setting required in WAS5.0 in order to get AdminClient?
--------------------------------------------------------
I put 1)admin.jar
2)wsexception.jar
3)jmxc.jar
4)pmi.jar
5)pmiclient.jar 6)JMX1.2Zip in classpath
-------------------------------------------
I followed 2 approaches
1)First Approach

com.ibm.websphere.pmi.client.PmiClient pmiClnt=new
PmiClient(NodeName,
PortNumber,"WAS50",false,"CONNECTOR_TYPE_SOAP");>>>
getting Exception in Runtime for PmiClient CreationPerfDescriptor[]
allservers=pmiClnt.listServers(NodeName);
javax.management.ObjectName[]
onames=pmiClnt.listMBeans(NodeName,ServerName);

Here have added all the Jar files in classpath of
WAS5.0, compiled fine , when I ran am getting
exception in Runtime for PmiClient Creation.
-----------------------------------------------
2)Second Approach
Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE,
AdminClient.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_HOST,
HostName);
props.setProperty(AdminClient.CONNECTOR_PORT,
PortNumber);
props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "false");

//props.setProperty(AdminClient.USERNAME, usrname); >>>>
We don't have username for SRSDev Appserver

//props.setProperty(AdminClient.PASSWORD, usrpwd);
>>>>>>We don't have password for SRSDev
Appserver(WAS5.0)

AdminClient adminClient =
AdminClientFactory.createAdminClient(props);----I am
getting exception in Runtime for adminClient Creation

// create a config service proxy object.
ConfigService configService = new
ConfigServiceProxy(adminClient);

// create a session.
Session session = new Session();
whereAmI=54;
// query to get the node where we want to create the
new server.
ObjectName node = configService.resolve(session,
"Node=" + NodeName)[0];
whereAmI=55;
// Locate the application object.
ObjectName rootID = configService.resolve(session,
"Deployment="+ApplicationName)[0];
//System.out.println ("rootID is: " + rootID);
ObjectName
listenerMBean=ConfigServiceHelper.createObjectName
(nwie.net:type=Custom,name=ListenerManagement,
id=uniqueid);
where nwie.net ----is domain name) if I follow this
syntax am getting compilation error)
------------------------------------------------

Basically my requirement is to get ListenerManaged
MBean / and use that bean to restart my MQListener
prorammatically in Websphere5.0
Advance Thanks
Do you have any file called Pmirm or Pmi.xml in you
server ? I need to know configuration
if you have any sample Pmirm.xml
Advance Thanks/Appreciated
regards
bala
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
    Bookmark Topic Watch Topic
  • New Topic