Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: share PL/SQL package variable across sessions?

Re: share PL/SQL package variable across sessions?

From: Thomas Kyte <tkyte_at_oracle.com>
Date: 29 Mar 2002 11:51:09 -0800
Message-ID: <a82gjd01kb1@drn.newsguy.com>


In article <ua9bmjg90egf22_at_corp.supernews.com>, "Kenny says...
>
>Is it possible to share package level public items across sessions?
>
>What I wish for is :
>
>create package public_data_cache as
> [static-- visible to all] mirrored_data is table of my_type;
>end public_data_cache;
>
>I borrowed the term 'static' from Java, which indicates one instance of a
>variable per system.

no, that means on instance of the variable across all instantiations of that class in an APPLICATION INSTANCE -- not across the "system" (eg: if you have 5 copies of that java program running, they each have their own static data, you have 5 possibly different values in your SYSTEM, one value per application instance).

you would use a table for this today in Oracle. It has all of the locking and serialization devices you need to ensure concurrent, correct access to this shared data.

>
>Kenny
>
>

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Fri Mar 29 2002 - 13:51:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US