File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes What are the JMXconfiguration required in WAS5.0 to get AdminClient/Sample Pmirm.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Reply locked New topic
Author

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

Bala Dakshin
Greenhorn

Joined: Apr 15, 2007
Posts: 5
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

Joined: Jan 10, 2002
Posts: 60782
    
  65

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: What are the JMXconfiguration required in WAS5.0 to get AdminClient/Sample Pmirm.xml
 
Similar Threads
Deployment in JBoss
What are JMX Configuration required in WebpSphere5.0 with JDK1.4/Sample Pmirm.xml
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