Results 1 to 2 of 2

Thread: Betterway to use global variable in webapplication

  1. #1
    Join Date
    Jan 2007

    Question Betterway to use global variable in webapplication

    Hi All,

    I am looking for how to use global variables in my web application.
    I have properties file in database and thus whenever required, we retrieve from database. All properties are alomost readonly. Once in a while they get changed in database. Thus server restart is not a problem when any value gets changed.

    Inorder to increase the performance, I am planning to use global variables for all properties which will make properties available through out the application and reduce the database interaction.

    I have an idea of using Static class to save the values and access these values. This is a webapplication and exists in Websphere server.

    Can anybody give me better ways of solving the problem and any flaws of using static class for this purpose.

    Thanks & Regards,

  2. #2
    Join Date
    Dec 2002
    Calgary, Canada
    thats not a bad idea at all. create a class with static props and use them accross the board. This is fairly common practice.


    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles