Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7974629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:25:46+00:00 2026-06-04T08:25:46+00:00

My Web service will run on a Jboss App Server or a Websphere app

  • 0

My Web service will run on a Jboss App Server or a Websphere app Server. For both of them I need to know the instance name, for Jboss I can use System.getProperty("jboss.server.name"), but what can I use for WebSphere? I can’t use WebSphere-specific methods, I need to call System.properties

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T08:25:48+00:00Added an answer on June 4, 2026 at 8:25 am

    To keep it platform neutral you can set a variable as a JVM argument for the Websphere server (one for each node if its clustered). For Websphere 7, you will find the following in the Admin Console …

    Servers > Server Types > Websphere application servers > [your cluster node] >
      >  Java and Process Management  > Process Definition > Java Virtual Machine >
        > Generic JVM arguments 
    

    and add a variable like this …

    -DServerName=serverNodeA
    

    You can then access the value in your code as …

    String serverName = System.getproperty("ServerName");
    

    This technique can be used with all application servers so long as you have access to add arguments to the JVM. I’m sure there must be Websphere specific API to query the node name, but then you’re typing your code to the server which makes it difficult to unit test and is not portable. I prefer this approach.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to develop a WCF server (basically a web service which will eventually
I am writing a Web app that will need to run a background process
I have a sql server 7.0 database and I will implement a web service
I need to develop a game server that will run periodically (e.g., triggered by
I'm working on a Wake on LAN service that will run from a web
I'm writing an ASP.NET web application which will run on Windows Server 2008 (IIS7).
I am creating a Java service which will run within a web servlet container
we are implementing a new web service. The web service will be a store
I'm developing a Web Service which will be called by clients which are written
I am developing a web-service that will be used by several clients. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.