users
[Top] [All Lists]

getting the app server DNS and port at runtime

To: <users@xxxxxxxxxx>
Subject: getting the app server DNS and port at runtime
From: "Arnett, Matt" <Matt.Arnett@xxxxxxxxxx>
Date: Fri, 8 Jul 2005 15:56:37 -0400
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Thread-index: AcWD913KZfPWgaiYThaP3t8ABC/Jaw==
Thread-topic: getting the app server DNS and port at runtime

For a J2EE application running in WebLogic 8.3, does anyone know how to get the app server DNS and port at runtime which is servicing the request?  Calling InetAddress.getLocalHost().getHostName(); and request.getRequestURL(); provide the actual server name and/or URL entered in the web browser.  But this is generally the clustered version of the URL and not the actual app server which ended up processing the request.

 

One thought I had was to add some command line JAVA_OPTIONS to the weblogic startup scripts which would “hard code” the real server DNS and port for each server in the cluster.  And then call System.getProperty(“myprop.appserver.dns”); and System.getProperty(“myprop.appserver.port”);.  This would be good because it would be available at every tier of the application.

 

But this requires additional configuration which I would like to avoid.

Thanks,
-Matt

 


This e-mail transmission contains information that is intended to be confidential and privileged. If you receive this e-mail and you are not a named addressee you are hereby notified that you are not authorized to read, print, retain, copy or disseminate this communication without the consent of the sender and that doing so is prohibited and may be unlawful. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please delete and otherwise erase it and any attachments from your computer system. Your assistance in correcting this error is appreciated.
<Prev in Thread] Current Thread [Next in Thread>
  • getting the app server DNS and port at runtime, Arnett, Matt <=