• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Determining the Admin Server Console Port

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to get the Websphere Admin Server Port number programmatically or by reading any XMLs?
 
Vishal Pai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Forgot to mention, I am using Websphere 5.1
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its not clear what you mean by "WebSphere Admin Server Port number." Do you mean the admin console HTTP transport port, the SOAP connector, etc? You also don't say whether you are using WAS ND or base, so I assume you are using base. With base, each application server has an admin console application. With ND, there is only one admin console in the DM server (dmgr).

All server endpoint addresses are stored in $WAS_HOME/config/cells/<your cell>/nodes/<node name>/serverindex.xml.

HTTP transport ports can be found in $WAS_HOME/config/cells/<your cell>/nodes/<node name>/servers/<server name>/server.xml. The HTTP HTTPTransport entry will have attribute sslEnabled="false", while the HTTPS HTTPTransport entry will have attribute sslEnabled="true".

There is no direct API to get a port, but you could use the WebSphere management classes to do so (the same classes the admin console and wsadmin program use). WebSphere javadoc can be browsed at http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/index.html. You might also try searching developerworks http://www7b.software.ibm.com/wsdd/ for help.

Bill Lasley
Versant Corp.
http://www.versant.com
 
Vishal Pai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I need the 'admin console HTTP transport port'.

Using the websphere management API classes (ConfigService and ConfigServiceHelper) I have been able to get a list of HTTP transport ports. But from this list how can I determine which one of these is the admin console port ?

I need this for all kinds of installation (ND as well as base)

Thanks,
Vishal
 
Bill Lasley
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure how to do it from Java, but you might try examining the admin_host virtual host object. All web applications are associated with a virtual host and by default, the admin console is always associated with the admin_host. The virtual hosts (and their HTTP transports) are defined in the virtualhosts.xml configuration file at the cell level.

Bill Lasley
Versant Corp.
http://www.versant.com
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
why dont you just try out each port and you will come to know which port it is
reply
    Bookmark Topic Watch Topic
  • New Topic