Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes What are JMX Configuration required in WebpSphere5.0 with JDK1.4/Sample Pmirm.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

What are JMX Configuration required in WebpSphere5.0 with JDK1.4/Sample Pmirm.xml

Bala Dakshin
Greenhorn

Joined: Apr 15, 2007
Posts: 5
Hi All
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
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Please don't post the same question in multiple forums. It creates duplicate conversations and thereby wastes the time of the people trying to help you. See http://faq.javaranch.com/view?CarefullyChooseOneForum

Thanks.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What are JMX Configuration required in WebpSphere5.0 with JDK1.4/Sample Pmirm.xml
 
Similar Threads
What are the JMXconfiguration required in WAS5.0 to get AdminClient/Sample Pmirm.xml
Deployment in JBoss
What are the JMX Configuration required in WebSphere5.0 with JDK1.4./Sample Pmirm.xml
Can not get MBean-JMX
what are JMX Configuration required in WebSphere5.0 with JDK1.4/Sample Pmirm.xml