Try OpenEdge Now
skip to main content
Object-oriented Programming
Programming with Class-based Objects : Using static members of a class : Static member scoping
 

Static member scoping

From the moment they are initialized, static members are available for the defining class type and for the duration of an ABL session. As such, static members are globally available resources for an ABL session, and values of static data persist throughout the session. For example, whether you access it from inside the class hierarchy of a class instance or (if PUBLIC) from outside of the class hierarchy where it is defined, the value of a given static property or data member persists from one access to the next for the duration of the session until it is changed by one of these accesses.
Note: On a state-reset AppServer, a given AppServer agent begins a fresh ABL session with each new client connection. Thus, each client connection to a state-reset AppServer re-initializes the static members of each class that is referenced.