• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Setting Environment Variable And Web Logic

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi

We are deploying our spring application in Weblogic server of which there are 2 version and we would like to configure an Environmental variable "POST-SETTING" to a value according to the version deployed.

Eg
Version A App deployed => POST-SETTING value = "VERSION-A"
Version B App deployed => POST-SETTING value = "VERSION-B"

The variable is used by the Web logic server.

We could configure the environment variable using the "-D" option on web logic ie by

AdminConcole -> Environment -> Servers -> Configuration -> Server Start -> Argument

However, this approach means the setting need to be changed depending on the Application deployed.

So ideally, we would like the setting to be done from within our application.

Note - the idea is to configure an environmental variable to be used by Web logic server NOT configure a System Property for the application.

Any suggestions as to how Spring could cater for this please ( or an alternative approach ).

Thank you
Pete

 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it's a weblogic property it should be set from inside weblogic. Spring container runs inside weblogic container. Ideally, your application should be agnostic to the container that it's running in, and any container specific settings should be done in the container
 
Pete Palmer
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Jayesh,

Thanks for the response.

Completely in agreement with you have said.

Not saying what I would like to do is ideal .. just looking at possible options.

So yes ... if there is way to configure a weblogic property via a deployed aplication .. I would be interested to know.

If nothing else, it would be interesting to understand if such a approach is feasible.

Thanks again.

Pete
 
reply
    Bookmark Topic Watch Topic
  • New Topic