Static class - one per JVM or one per app?

Discussion in 'Java' started by junk1@davidbevan.co.uk, Dec 20, 2004.

  1. Guest

    I have a class called MyClass that contains a static variable (myVar).

    I have two J2EE apps running on WebSphere under the same JVM,
    MyFirstApp and MySecondApp. From MyFirstApp i set the value of myVar by
    doing MyClass.setMyVar(3).

    .....what will be the value of MyClass.getMyVar() when run from
    MySecondApp?

    ie - will the static var have scope across the whole JVM or just the
    web app?

    Thanks

    David Bevan

    http://www.davidbevan.co.uk
     
    , Dec 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?S01aX3N0YXRl?=

    Quick one - Is SESSION per browser instance or per IP Address?

    =?Utf-8?B?S01aX3N0YXRl?=, Apr 4, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    5,895
    gerry
    Apr 10, 2006
  2. Kevin Hooke

    Re: Handling both MS JVM and Sun JVM

    Kevin Hooke, Aug 26, 2003, in forum: Java
    Replies:
    2
    Views:
    881
  3. Razvan
    Replies:
    1
    Views:
    417
    tony vee
    Sep 10, 2004
  4. Replies:
    5
    Views:
    2,558
  5. Michael Schuerig
    Replies:
    6
    Views:
    143
    Robert Dober
    Feb 26, 2007
Loading...

Share This Page