This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Determining the Admin Server Console Port

 
Vishal Pai
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Forgot to mention, I am using Websphere 5.1
 
Bill Lasley
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Niki Nono
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why dont you just try out each port and you will come to know which port it is
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!