• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to get system properties in Websphere 5.0.2

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI
I am running an application in Websphere5.0.2 I need to get one System property port number dynamically while the app server is running. I hope it should be like MBean in Weblogic.
MBeanHome mbeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
ServerMBean serverMBean =
(ServerMBean)mbeanHome.getAdminMBean(serverName, "Server");
return serverMBean.getListenPort();
If anybody has the skeleton code to get the system property in Websphere5.0.2 pls. do post it.
Thanks,
A.Chandramohan
 
author
Posts: 3892
5
Redhat Quarkus Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sorry, I can't figure out exactly what you want to do. Do you just need to fetch a system property, or are you looking for a specific WebSphere MBean? Tell us WHY you need this information and we may be able to help you.
Kyle
 
Anbarasan Chandramohan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kyle,
Thanks. Actually we need to fetch a system property dynamically. For ex: ListenerPortNumber, HostName. How to do this?
We couldnt understand the purpose of MBean in websphere. Can you brief the purpose.
Thanks
A.Chandramohan
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
MBeans are a concept from JMX. JMX is about application management. The server and network deploy all are JMX enabled application.
Static MBean concept is very simple.
 
Kyle Brown
author
Posts: 3892
5
Redhat Quarkus Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that my problem is that we may have a different definition of "System Property". If you literally mean System properties as defined in the Java language, you use System.getProperty() as in any other Java program. However, I don't think that's what you mean by the context. I ask you again, WHAT are you trying to do and why?
Kyle
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,

I'm also facing the same problem. Can you tell me how did you solve it.
I'm waiting for your reply.

Thanks and Regards,
Hari.
 
reply
    Bookmark Topic Watch Topic
  • New Topic