-
Jun 29th, 2008, 03:53 AM
#1
Monitoring WebLogic MBeans
hi,
I am new with Spring.
I would like to know how can i use Spring for Monitoring WebLogic MBeans?
for example (the old code):
the data is:
host = "xxx"
port = 7001
username = "yyy"
password = "zzz"
protocol = "t3"
urlPath="/jndi/weblogic.management.mbeanservers.domainruntime"
JMXServiceURL serviceURL = new JMXServiceURL(protocol,host, port,urlPath);
JMXConnector connector = JMXConnectorFactory.connect( serviceURL, h );
MBeanServerConnection connection=connector.getMBeanServerConnection();
Set set = connection.queryNames( null, null )
How can i use Spring to change this code?
Which classes or package should i use?
Thanks.
-
Jun 29th, 2008, 01:29 PM
#2
I use spring-jmx with weblogic jmx beans. Checkout http://edocs.bea.com/wls/docs92/prog...g.html#1071751. You didn't mention what version of weblogic you are using.
One thing I have learned is that on 9.x and up, on the server side you should locate the mbean server with a jndi lookup.
Also see http://forum.springframework.org/showthread.php?t=19857
-
Jun 30th, 2008, 01:36 AM
#3
TKV
-
Jun 30th, 2008, 09:29 AM
#4
I already saw this examples,but..
I already saw this examples,but i would like to know if there is another way to use Spring framework:
1. How can i pass data to the xml variables ${WS_HOST}:${WS_PORT}
I get this data from the user on runtime.
2. My java code is:
ApplicationContext AC = new FileSystemXmlApplicationContext("beans.xml");
MBeanServerConnection r = (MBeanServerConnection)AC.getBean("runtimeMbeanSer verConnection");
r.queryNames(null, null);
Is this is the recommended way?
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules