• 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

Application Level Variable -- set/reset using a JSP -- in two contexts

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have an application level variable, which is set dynamically through a JSP page (uses Authentication and Authorization - restricted page). We tested the set/reset functionality of this variable/flag using our ONE server. Currently, for our application, in Production, we have two servers.

My question is how I can set/reset this variable/flag for the application running in one particular server? In my user-interface JSP, the admins should be able to select a particular server (one of the two) and decide to turn-on or turn-off this flag.

How we can achieve this functionality? What needs to be changed at Web-server or App Server levels? Any information or references are highly appreciated.

Our app is running on WAS5 ... Developing in WSAD 5.1.2

Thanks
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nagesh,
There is no platform independent way of doing this. You would have to be able to direct the JSP request to a specific server, which is not possible.

I imagine there is some WebSphere specific API that you could use to have one clone call the other clone, but this would be messy. What are you trying to accomplish with this variable? Maybe there is another way.
 
Nagesh Rachakonda
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Nagesh,
There is no platform independent way of doing this. You would have to be able to direct the JSP request to a specific server, which is not possible.

I imagine there is some WebSphere specific API that you could use to have one clone call the other clone, but this would be messy. What are you trying to accomplish with this variable? Maybe there is another way.



Our application logs metrics into the database and acts as a middleware component. When the database is hung or not responding (recently happened -- due to a infinite thread process caused by other shared database app), I need to stop logging transactions metrics into the database. We are trying to achieve this in two ways:

1. Programetically (defined a global app level variable; checking the connection timeout occurances etc., to set the variable; finally based on this global flag, turning the database entries on & off.)

2. (Otherway - for immediate effect - based on other monitor messages) Through web, with the help of a secured JSP, admins(managers/team leads) should be able to turn this flag on/off.

My question above to accomplish the second step.

Thanks for your reply. Any thoughts/suggestions are highly appreciated.
[ April 12, 2005: Message edited by: Nagesh Rachakonda ]
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nagesh,
I would suggest writing to a property file on the app server. This property could have the status of the database (on or off) and the apps could check it before each database access for every few minutes.
 
Nagesh Rachakonda
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Nagesh,
I would suggest writing to a property file on the app server. This property could have the status of the database (on or off) and the apps could check it before each database access for every few minutes.



If we write to a properties file, these will be loaded to the application once when the server boots-up! Once they are available at the application context, it is not possible to alter the setting unless we restart the server...(my understanding). Am I on the right pace? If not, what do you mean? Please explain!
reply
    Bookmark Topic Watch Topic
  • New Topic