Static data watermark

hi to all of you
Does anyone know something about static data watermarks. Any information could be helpful
Thanks in advance
Maddy

not sure whether I understood you question correctly:
anyway, (maybe it will help)
if you declare some data (or even a method) as static, it basically means that it exists once for the whole class. You access it via a reference to class - as opposite to instance variables or methods, which are accessed thru a reference to an instance.
Note that for static (or "class") variables/methods no instance need to exist at all!class cl1 {
  public static int x = 0;
  public int y = 1;
int xx = cl1.x;
cl1 instance = new cl1();
int yy = instance.y;

Similar Messages

  • Creation of a table with static data(not a DB table)

    Hi
    I need to display a table with some static data in an OAF page. This table is not a DB table. It is like an HTML table
    I have placed the following query
    SELECT 'A1','B1' FROM DUAL UNION SELECT 'A2',B2' FROM DUAL in the VO. But it is returning a single row which is acting as the header of the table.
    Can anyone help me to create the table with 2 rows inserted in it.
    Thanks
    Edited by: gsaxena on Aug 4, 2009 3:04 AM
    Edited by: gsaxena on Aug 4, 2009 5:24 AM

    Hi
    Please execute your VO inside the CO of table region ,right now it is not getting executed,thats y it is giving just column names
    use the following code PR method of CO
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject oav = (OAViewObject)am.findViewObject("XXVO");
    oav.first();
    let me know in case of any issue
    thanx
    Pratap

  • What is the correct term for "static data"

    Hi,
    In this development shop we use the term "static data" for data that is loaded in the database prior to any customer registration / transactions being generated.
    It might be currency codes, types of products etc - data that the application needs up front.
    I was chided for using the term "static data" here before but was wondering if there is a better term for this -
    do people generally call this type of data configuration data or read-only data ?
    Or meta data ?
    Any help appreciated
    Rgds
    Peter

    user3047096 wrote:
    In this development shop we use the term "static data" for data that is loaded in the database prior to any customer registration / transactions being generated.
    It might be currency codes, types of products etc - data that the application needs up front.
    I was chided for using the term "static data" here before but was wondering if there is a better term for this -
    do people generally call this type of data configuration data or read-only data ?
    Or meta data ?I think "static data" is commonly understood in exactly the way you've used it, but "reference data" seems like a pretty good option.
    Regards
    Jonathan Lewis

  • How to synchronize concurrent access to static data in ABAP Objects

    Hi,
    1) First of all I mwould like to know the scope of static (class-data) data of an ABAP Objects Class: If changing a static data variable is that change visible to all concurrent processes in the same Application Server?
    2) If that is the case. How can concurrent access to such data (that can be shared between many processes) be controlled. In C one could use semaphores and in Java Synchronized methods and the monitor concept. But what controls are available in ABAP for controlling concurrent access to in-memory data?
    Many thanks for your help!
    Regards,
    Christian

    Hello Christian
    Here is an example that shows that the static attributes of a class are not shared between two reports that are linked via SUBMIT statement.
    *& Report  ZUS_SDN_OO_STATIC_ATTRIBUTES
    REPORT  zus_sdn_oo_static_attributes.
    DATA:
      gt_list        TYPE STANDARD TABLE OF abaplist,
      go_static      TYPE REF TO zcl_sdn_static_attributes.
    <i>* CONSTRUCTOR method of class ZCL_SDN_STATIC_ATTRIBUTES:
    **METHOD constructor.
    *** define local data
    **  DATA:
    **    ld_msg    TYPE bapi_msg.
    **  ADD id_count TO md_count.
    **ENDMETHOD.
    * Static public attribute MD_COUNT (type i), initial value = 1</i>
    PARAMETERS:
      p_called(1)  TYPE c  DEFAULT ' ' NO-DISPLAY.
    START-OF-SELECTION.
    <b>* Initial state of static attribute:
    *    zcl_sdn_static_attributes=>md_count = 0</b>
      syst-index = 0.
      WRITE: / syst-index, '. object: static counter=',
               zcl_sdn_static_attributes=>md_count.
      DO 5 TIMES.
    <b>*   Every time sy-index is added to md_count</b>
        CREATE OBJECT go_static
          EXPORTING
            id_count = syst-index.
        WRITE: / syst-index, '. object: static counter=',
                 zcl_sdn_static_attributes=>md_count.
    <b>*   After the 3rd round we start the report again (via SUBMIT)
    *   and return the result via list memory.
    *   If the value of the static attribute is not reset we would
    *   start with initial value of md_count = 7 (1+1+2+3).</b>
        IF ( p_called = ' '  AND
             syst-index = 3 ).
          SUBMIT zus_sdn_oo_static_attributes EXPORTING LIST TO MEMORY
            WITH p_called = 'X'
          AND RETURN.
          CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
              listobject = gt_list
            EXCEPTIONS
              not_found  = 1
              OTHERS     = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'DISPLAY_LIST'
    *       EXPORTING
    *         FULLSCREEN                  =
    *         CALLER_HANDLES_EVENTS       =
    *         STARTING_X                  = 10
    *         STARTING_Y                  = 10
    *         ENDING_X                    = 60
    *         ENDING_Y                    = 20
    *       IMPORTING
    *         USER_COMMAND                =
            TABLES
              listobject                  = gt_list
            EXCEPTIONS
              empty_list                  = 1
              OTHERS                      = 2.
          IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ENDIF.
      ENDDO.
    <b>* Result: in the 2nd run of the report (via SUBMIT) we get
    *         the same values for the static counter.</b>
    END-OF-SELECTION.
    Regards
      Uwe

  • Problem converting static data load mapping to MOLAP

    Hi
    as a prototyping exercise I am converting some of our ROLAP dimensions and corresponding data load mappings (1 static data i.e. "-1" id to handle unknowns in fact data, and 1 for real data coming from a table) to MOLAP.
    The dimension itself converts and deploys correctly and the real data mapping also redeploys and executes correctly.
    HOWEVER
    my static data mapping will not execute successfully.
    The mapping uses constants (ID = -1, NAME 'UNKNOWN' etc), not all attributes are linked (this has been tried). My column WH_ID which was the ROLAP surrogate key gets converted to VARCHAR2 as expected. Mapping does deploy cleanly.
    The error i get is below. I have been banging my head on this for a couple of days and tried searching the Net, Metalink to no avail. I'm hoping someone out there can help
    LOAD_STATIC_D_TRADER_IU
    Warning
    ORA-20101: 15:48:04 ***Error Occured in BUILD_DRIVER: In __XML_SEQUENTIAL_LOADER: In __XML_LOAD_ATTRS: Error loading attributes for hierarchy, D_TRADER.AW$NONE.HIERARCHY, level D_TRADER.TRADER.LEVEL, mapping group D_TRADER.TRADER.MAPGROUP1.DIMENSIONMAPGROUP. In __XML_LOAD_ATTRS_ITEM: In ___XML_LOAD_TEMPPRG: The SQL IMPORT command cannot convert from the TEXT type to the DECIMAL type.
    TRUNCATE_LOAD=false
    AW Execution status: Success
    15:48:00 Started Build(Refresh) of MARTS Analytic Workspace.
    15:48:00 Attached AW MARTS in RW Mode.
    15:48:01 Started Loading Dimensions.
    15:48:01 Started Loading Dimension Members.
    15:48:01 Started Loading Dimension Members for D_TRADER.DIMENSION (1 out of 1 Dimensions).
    15:48:03 Finished Loading Members for D_TRADER.DIMENSION. Added: 1. No Longer Present: 885.
    15:48:03 Finished Loading Dimension Members.
    15:48:03 Started Loading Hierarchies.
    15:48:03 Started Loading Hierarchies for D_TRADER.DIMENSION (1 out of 1 Dimensions).
    15:48:03 Finished Loading Hierarchies for D_TRADER.DIMENSION. 1 hierarchy(s) STANDARD Processed.
    15:48:03 Finished Loading Hierarchies.
    15:48:03 Started Loading Attributes.
    15:48:03 Started Loading Attributes for D_TRADER.DIMENSION (1 out of 1 Dimensions).
    15:48:04 Failed to Build(Refresh) MARTS Analytic Workspace.
    15:48:04 ***Error Occured in BUILD_DRIVER: In __XML_SEQUENTIAL_LOADER: In __XML_LOAD_ATTRS: Error loading attributes for hierarchy, D_TRADER.AW$NONE.HIERARCHY, level D_TRADER.TRADER.LEVEL, mapping group D_TRADER.TRADER.MAPGROUP1.DIMENSIONMAPGROUP. In __XML_LOAD_ATTRS_ITEM: In ___XML_LOAD_TEMPPRG: The SQL IMPORT command cannot convert from the TEXT type to the DECIMAL type.

    Hi this looks like a bug in set based mode with using numeric dimension attributes and loading them from a constant. Row based mode is OK, which stages the data before loading the AW, but you probably don't want this.
    A workaround is to add an expression operator in the map. You will have to add a link from a source table/constant into the expression operator to satisfy the map analyser. But then you can add expressions such as your numeric attributes in the expression operator's output group, define the values for each expression and map these expression outputs (not the numeric constants) into your dimension. Hopefully this makes sense.
    Cheers
    David

  • How to write static Data in xml using XStream

    Hi All,
    I have a swing desktop application.
    In this ProposalData class contains all the input value of the application.
    I want to write proposal data to XML using XStream.
    Below I attached the part of code which responsible for create xml.
    But it is written all the non static data to the xml not the static data.
    public class ReadWriteXml {
        static ProposalData proposalData = new ProposalData();
        static XStream xstream = new XStream(new DomDriver()); // does not require XPP3 library
        FileWriter fileWriter = null;
        FileReader fileReader = null;
        public void writeXMLFile(String fileName)throws IOException{
            try{
                fileWriter = new FileWriter(fileName);
                proposalData = VPProposalApp.getApplication().getInstances().updateData();
                xstream.toXML(proposalData, fileWriter);
                } catch (Exception e) {
                                System.out.println("IOException : "+e);
    }Can any body help me to write the satac data in xml using Xstream.
    Please help me.
    Thanks in Advance
    Ananda

    Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

  • Using workspaces for "ALMOST" static data

              Hi,
              The application that we are developing has the following requirement:
              We have a whole bunch of data that is ALMOST static as far as the application is concerned.
              However this data can change infrequently.
              We have two solutions in mind
              1) We are planning to have a StaticDataManager component that will handle the reading/updation of this data.
              All the other components of the application will get the static data from the StaticDataManager
              and cache this data to avoid communication between the components.
              The application will be hosted on a clustered WLS configuration.
              Now suppose an updation takes place, how best can we update all the components that have the cached data?
              2) In case we use Workspaces to cahce this static data, does the cluster configuration take care of
              updating the workspaces in the machines in the cluster?
              TIA!
              Sreeja
              

    If you do like you say and specify servera and then specify serverb
              respectively, then yes the workspace doesn't show the same information
              across the cluster. However, if you always specify the cluster, serverc,
              then no matter which side you update or read from the data is the same. So
              yes, if you specifiy a specific server in the cluster, and not the cluster,
              the data will not replicate across the cluster, and you lose concurrency.
              Let me paste in the output to show you what I am seeing which proves the
              data is being replicated with a single write.
              Tester ver. 1.00.00 ----> Test started...
              Connected successfully using http to ethouic97/198.171.100.107:80
              ws.store(DOG, FIDO)
              Connected successfully using http to ethouic97/198.171.100.106:80
              ws2.fetch(DOG)
              DOG = FIDO
              These are some system outs from the test app below with a few extra system
              outs. Notice if the cluster is always your connection point and not an
              individual server, in this case ethouic97. Then the answer to the original
              first question is YES, you can store near static data in workspaces on a
              cluster to have the data replicated across the cluster. However, you must
              always address the cluster and not the individual servers, in this case
              address ethouic97 never server 106 or 107 directly.
              Jonathon Cano
              "Mike Reiche" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Well, it does look like it works, doesn't it?
              >
              > Now try running the first half on one WLS instance and the other half of a
              different WL instance and
              > specify servera in the first half and serverb in the second half. If the
              workspace is replicated it should
              > work.
              >
              > It's broken now. Not really. Regardless of where the t3 connection is
              made, the workspace is
              > in the local WL instance.
              >
              > Mike
              >
              >
              > "Jonathon Cano" <[email protected]> wrote:
              > >Details:
              > >We are using a DNS cluster where serverc actually maps to servers a and
              b.
              > >If you set the workspace to SCOPE_SERVER, and use a t3client connection
              to
              > >the serverc, it can not be servera or serverb directly, then the
              workspace
              > >is updated or read from the data is persisted across both sides of the
              > >cluster. All reads and writes must be done using the cluster name for
              this
              > >to work. I use this to manage fail-over for some Vitria subscribers I
              have
              > >runnig at startup. I have a tester I wrote which works, here is the
              code:
              > >
              > > private void testWorkSpaces() {
              > >
              > > try {
              > >
              > > T3User userInfo = new T3User("system","password");
              > >
              > > T3Client t3 = new T3Client("http://cluster:80",userInfo);
              > > t3.connect();
              > >
              > > WorkspaceDef ws =
              >
              >t3.services.workspace().getWorkspace().getWorkspace("test",WorkspaceDef.OPE
              N
              > >,WorkspaceDef.SCOPE_SERVER);
              > > ws.store("DOG", "FIDO");
              > >
              > > t3.disconnect();
              > >
              > > T3Client t32 = new T3Client("http://cluster:80",userInfo);
              > > t32.connect();
              > >
              > > WorkspaceDef ws2 =
              >
              >t32.services.workspace().getWorkspace().getWorkspace("test",WorkspaceDef.OP
              E
              > >N,WorkspaceDef.SCOPE_SERVER);
              > > String dogName = (String) ws2.fetch("DOG");
              > >
              > >
              > > t32.disconnect();
              > >
              > > System.out.println(dogName);
              > >
              > > } catch (Exception e) {
              > > System.out.println("Test Work Spaces Failed.);
              > > e.printStackTrace();
              > > }
              > >
              > > }
              > >
              > >The first t3client connection echos out that it is connecting to servera.
              > >The second t3client connection echos out that it is connecting to
              serverb.
              > >However, the data being returned is the name FIDO which was written to
              the
              > >workspace when connected to servera. Thus, as long as you are connecting
              to
              > >the cluster, you get replication of data across cluster for workspaces.
              > >
              > >WLS 5.1
              > >
              > >Jonathon Cano
              > >
              > >
              > >"mreiche" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> >I am confused.
              > >>
              > >> Yes.
              > >>
              > >> >So why was the original answer to workspaces being used for clustering
              > >near static data NO?
              > >>
              > >> Because that's what the documentation says?
              > >>
              > >> Are you really, really sure it's being propagated? Or perhaps it's just
              > >being updated identically on both instances?
              > >>
              > >> Mike
              > >>
              > >> "Jonathon Cano" <[email protected]> wrote:
              > >> >I am confused. I am storing data in the workspaces right now, and I
              am
              > >> >using this data in a cluster. I can update the data in the cluster
              just
              > >> >fine, and both sides of the cluster are being updated. So why was the
              > >> >original answer to workspaces being used for clustering near static
              data
              > >NO?
              > >> >
              > >> >Jonathon Cano
              > >> >
              > >> >"Tao Zhang" <[email protected]> wrote in message
              > >> >news:[email protected]...
              > >> >>
              > >> >> But the problem is whether you want Exactly-once-per-cluster data or
              > >not.
              > >> >> If not, you can deploy the data object into each server in the
              cluster,
              > >> >but in the data object, it contains the logic of updating itself.
              > >> >> Otherwise, you have to make it a pinned service.
              > >> >>
              > >> >> It's hard to describe here.
              > >> >>
              > >> >> Hope the document can solve your problem.
              > >> >>
              > >> >> http://www.weblogic.com/docs51/classdocs/API_jndi.html#user
              > >> >>
              > >> >> Good Luck.
              > >> >>
              > >> >> Tao Zhang
              > >> >>
              > >> >> "Sreeja" <[email protected]> wrote:
              > >> >> >
              > >> >> >Thanks. Can you please elaborate on the solutions 1 and 2. We are
              > >trying
              > >> >to eliminate the
              > >> >> > usage of 3 - entity beans - since we do not want the components
              using
              > >> >the data to contact
              > >> >> >the entity bean every time they need the static data - as this
              would
              > >> >result in remote calls
              > >> >> >for every usage.
              > >> >> >Sreeja
              > >> >> >
              > >> >> >"Tao Zhang" <[email protected]> wrote:
              > >> >> >>No, the workspace can't be clustered, the data can't be propagated
              to
              > >> >other
              > >> >> >>servers in the cluster.
              > >> >> >>Of course , you can select one server as the data holder and other
              > >> >servers
              > >> >> >>will be t3 client. But it's time consuming to
              > >> >> >>connect to the data holder server.
              > >> >> >>Possible solutions:
              > >> >> >>1. RMI.
              > >> >> >>Deploy the rmi as pinned service which hold the data.
              > >> >> >>2. jndi
              > >> >> >>The data can be propagated by jndi's default behavior.
              > >> >> >>3. database or entity bean.
              > >> >> >>
              > >> >> >>Hope this can help.
              > >> >> >>
              > >> >> >>Tao Zhang
              > >> >> >>
              > >> >> >>Sreeja <[email protected]> wrote in message
              > >> >> >>news:[email protected]...
              > >> >> >>>
              > >> >> >>> Hi,
              > >> >> >>>
              > >> >> >>> The application that we are developing has the following
              > >requirement:
              > >> >> >>> We have a whole bunch of data that is ALMOST static as far as
              the
              > >> >> >>application is concerned.
              > >> >> >>> However this data can change infrequently.
              > >> >> >>> We have two solutions in mind
              > >> >> >>> 1) We are planning to have a StaticDataManager component that
              will
              > >> >handle
              > >> >> >>the reading/updation of this data.
              > >> >> >>> All the other components of the application will get the static
              > >data
              > >> >from
              > >> >> >>the StaticDataManager
              > >> >> >>> and cache this data to avoid communication between the
              components.
              > >> >> >>> The application will be hosted on a clustered WLS configuration.
              > >> >> >>> Now suppose an updation takes place, how best can we update all
              the
              > >> >> >>components that have the cached data?
              > >> >> >>>
              > >> >> >>> 2) In case we use Workspaces to cahce this static data, does the
              > >> >cluster
              > >> >> >>configuration take care of
              > >> >> >>> updating the workspaces in the machines in the cluster?
              > >> >> >>>
              > >> >> >>> TIA!
              > >> >> >>> Sreeja
              > >> >> >>>
              > >> >> >>
              > >> >> >>
              > >> >> >
              > >> >>
              > >> >
              > >> >
              > >>
              > >
              > >
              >
              

  • OBIEE11g - Report Multi Currency Display (Static Data)

    Hi All,
    I have a requirement where i need to display amount data in multi currency format in OBIEE 11g like LCY and OCY format.User have to select the currency type like USD,YEN,EURO and resulting amount data in report should display in that currency format.
    Pls suggest me is it required to do ETL Changes i.e we need to load data in Database in multi currency format
    can we do this at Report level i.e can convert the amount in required currency format.
    Note: Spot rate is currency data it's loading by monthly its a static data.
    please refer my expected output screen short:
    http://imageshare.web.id/images/0dnlgxlvmhl7u5tdbac1.jpg
    (currently we are displaying one currency now we need to show multicurrency)
    Just FYI...
    joins:
    "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."OCY" =
    "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."ORIG_CURRNBR"
    AND
    "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."PPN_DT" = "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Business_Date"
    here ocy & ORIG_CURRNBR is the foreign currency (i.e: USD,YEN,EURO etc)
    Calculation part:
    CASE WHEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Product_Type" IN ('Bond', 'Bonds', 'Callable Bonds')
    THEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Nominal_AMT" * "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."NON_DISC_SPOT"
    WHEN "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."Product_Type" ='Equities' THEN
    ("GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."MKT_VALUE" - "GPC_DataMart"."GPC_DataMart"."dbo"."IW_POSITION"."CAPITAL_GAIN" ) * "GPC_DataMart"."GPC_DataMart"."dbo"."MX_SPOT"."NON_DISC_SPOT"
    END
    in the above calc amount * spot_rate
    I already refer the below one but it wont suite for my case:
    http://www.rittmanmead.com/2010/06/oracle-bi-ee-10-1-3-4-1-currency-conversions-fx-translations-part-1/
    http://gerardnico.com/wiki/dat/obiee/currency
    Thanks in advance
    Regards,
    Deva
    Edited by: Devarasu on Nov 16, 2011 3:13 PM

    Hi Deepak,
    our table will like below one,how we can calculate on fly calculation for this,
    in my dashboard MX_spot.ocy prompt column --> set request variable.
    how i can use this request variable in RPD-->BMM --> logical expression?.
    Table 1: Postion (Fact)
    PRODUCT_ID      ORIG_CURRNBR     (Nom+Capital+PREM_DISC_AMORTISE) Business_Date
    ========================================================================
    HKD T-NOTE 1312     CN1      48407.555               31/10/2011
    HKD T-N 07Y1402     HKD          -45000.23               31/10/2011
    Table 2: Mx_Spot (all currency with static rate)
    OCY     NON_DISC_SPOT     PPN_DT     
    SGD     0.1962748     31/10/2011     
    HKD     0.1605621     31/10/2011     
    CN1     1     31/10/2011

  • Static data Vs dynamic data.

    dear All Please Let me know the difference b/w Static data and dyanmic data.
    Thanks in advance

    Dynamic data changes, Static doesnt.

  • How To Create Table with Static Data

    JDEV 10.1.3
    ADF BC
    ADF Faces
    I am trying to make some simple screen/screenflow diagrams to help flesh out some requirements. To do that, I need to make a table with static data that is not hooked up to a data source (because the data model has not yet been clearly defined, and I'm using the diagrams to help iterate the requirements).
    Is it possible to create a table that shows static data (i.e. a set of rows that does not come from a model data source, but rather is hardcoded.)
    If not, how does one create mock ups without actually implementing the data model?
    Thank you.

    Deepak, what specifically in those 2 links from Amis are useful? Those 2 posts are about bind variables, not static list of values?
    In response to the original poster, I'll attempt to help a little more.
    In the 11g release you can create VOs based on a static list of values. However in your case on 10.1.3, the best method I've found is to create a VO based on a SELECT <columns> FROM DUAL statement. The columns then include your dummy data. If you need more than one row, simply UNION ALL a number of SELECT statements together.
    What I haven't checked, is when you eventually transform the VO based on the SELECT DUAL statement into a VO based on an EO drawing real data from the database, is it an easy process? I recommend you try this out before committing to the approach above. Let us know how you go.
    Regards,
    CM.

  • Static data in runnable objects of threadpool

    hi all,
    I have a threadpool and schedule Runnable objects into it.
    The runnble objects are run as per schedule.
    But I want to declare and initialize a static data in the runnable object. And I expect it to be initialised only once ie, the first time the runnable object is invoked by the threadpool and to be ignored in the subsequent scheduled invocations. And I want to access the static data throught the runnable object.
    I want to know whether the above behavior will take place or should i use any other ways to do this.

    Then maybe something like this?
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import java.util.Date;
    public class RunnableWithPreviousState implements Runnable {
        private static class State {
         public Date startTime, endTime;
         public State() {
             startTime = new Date();
        private static List<RunnableWithPreviousState> runnables = Collections
             .synchronizedList(new ArrayList<RunnableWithPreviousState>());
        private State previousState, myState;
        @Override
        public void run() {
         myState = new State();
         runnables.add(this);
         int index = runnables.indexOf(this);
         if (index > 0) {
             index -= 1;
             previousState = runnables.get(index).myState;
         if (previousState != null) {
             // inspect previousState
         // do other processing
         myState.endTime = new Date();
    }Piet

  • Reinitialization of static data by multiple applets

    Hi,
    I have a problem with initialization of shared static data by multiple applets. I have three applets running inside of different HTML frames in a multi-frame HTML framework. Applets are loaded as JAR files. In addition, every applet has one or two 3rd party JARs listed in the APPLET tag. Applets share the same codebase and run inside the same JVM.
    I use static data to perform the inter-applet communication. This is simply a static list of applet references that is being maintained in the base applet class (all applet classes are inherited from that class). The problem is that when applets get constructed, the static data in the base class sometimes gets reinitialized multiple times. As I understand, the static data should be initialized just once on initial load of the base applet class (applets have the same codebase).
    This problem seems to be caused by the race condition (applets initialize on different threads launched by the browser). Under some circumstances (I change the number and order of JARs, etc.) everything works fine. I can reproduce this problem on both Explorer 5.x and Netscape 4.7 (did not try others). I run applets using native browser's JVM.
    Has anybody had such problem before? Is it caused by the large number of JARs ? Is there any way to guarantee that static data will be initialized once in the multi-applet environment ?
    Thanks,
    hparfen

    Hi,
    Did you find something to solve your problem because I have exactly the same.
    Tony

  • Static Data Formatting in SSRS VS2010

    Hello - I hope you guys are having a wonderful day so far!!
    I am using a SQL Server 2012 with VS 2010. In my SSRS report, I have a SP based data set. On top of what the report pulls based on user entered parameters, I want 6 rows of additional static data to be included in the report. So, at the bottom of the report
    I created 6 static fields and manually entered all the hard coded values. Please mind that these static values repeat every month. So far works great. My challenge is to format the amount field. Although, I was able to change the text box properties and formatted
    the values as 'Currency' but it does not come across currency when a report is rendered. In addition to that I have a ID field which increments by number based on # of rows. Last 6 rows of static data do not have IDs in front of them. Similarly, the user entered
    parameters 'Start Date' and 'End Date' are also not populated for those static rows. So, how is it possible to assign IDs, user entered parameter values and values formatting in the static rows? I am wondering if any solutions applying expressions are available
    or even possible? Gurus, please suggest. Thank you again!
    SJ
    Sanjeev Jha

    Hi SQLTurtleReally,
    According to your description, you want to sum the values in the appended static row and the total value of detail rows. Also you have a column to show the row numbers and include those static rows. Right?
    In Reporting Services, when we use build-in Aggregation function, it only works within a scope, this scope can be Group, data region or DataSet. In this scenario, even the static rows are in the tablix, it has nothing to do with the detail rows, they are
    not in a same scope. So the RowNumber() and Sum() function can never include the values in those static rows. For your requirement, the most effective workaround is add these hard code values into database as records so that they will be in same DataSet with
    the detail rows.
    Reference:
    Aggregate Functions Reference (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Nonlinear Curve Fit and using static data

    I am trying to fit data to a 2D function using the Nonlinear Curve Fit VI in Labview 8.2.1, but I would like to also include 2 parameters that I don't want to be optimized.  I cannot directly use constants since every time I run the fitting I need to change the 2 parameter values.  I tried to modify the example by Altenbach according to my own application in the link below. 
    http://forums.ni.com/ni/board/message?board.id=170&message.id=230831
    I think the problem is that I don't completely understand how to use the static VI reference with the Nonlinear Curve Fit VI?  It looks like there is a static data control that I could use to add additional parameters, but I am not sure?  I can get Altenbach's code to work if I change the function to something different, and even if I change the number of inital fitted parameters.  I just can't figure out how I can add parameters using a control that will not be optimized.  I can attach an example, but it is very similar to Altenbach's code except the function is different, and I am trying to add additional parameters that are not optimized.  Thanks for any help.
    Kevin Baker 

    Thanks Trey.  I am sorry I didn't make it clear what I was talking about before.  I am attaching an example that will hopefully clarify what I would like to do.  When I try to pass the static reference to the Nonlinear Fit VI it says gives me a broken wire and says "function conflict".  I am assuming the problem is that I inserted another control to the VI when I wasn't supposed to.  I just don't know of any other way to pass data into the VI, and still have the Nonlinear Fit VI still work?  What is the "data" control in the Nonlinear Fit VI used for anyway?  It seems that that it was want I need, but I don't know how to use it?  Thanks again for any help.
    Attachments:
    Fit equation.vi ‏15 KB
    general lorentzian.vi ‏26 KB

  • Is Apex used for only static data?

    Can Apex use data directly from the database (means from database schemas) or must I always create the objects in the Apex workspace before using it?
    I ask because all of the examples I have seen are using static data. Can Apex be used for data that is changing (real-time)?
    If so, where can I find an example of using real-time data?
    Thanks!

    I see, so apex can not pull data from other application schemas. Apex is used to create an application from scratch (or imported/uploaded) and then you can dynamically add records, like a data/order entry application. It is a tool that provides a better and more complete way to report and present(forms) on dynamic/static data rather that using tools like access or excel spreadsheet.
    Is this correct?
    Thanks!

Maybe you are looking for

  • Is there a tutorial on - how to call static java methods

    I have defined external JAVA resource using a .jar file and have successfully catalogged the same. Now I need to pass variables to a static method in a class and also get the return variable mapped into a BPM variable. Can someone share sample Java I

  • How to allow user to put only numbers and backspace?

    Hello! On my form i need to prevent user from typing anything but numbers in a specific field. But i also need to let user delete typed symbols. For that porpuse i have a function: function regExp(newsymbol){     var re = /[0-9\b]/;     if(newsymbol.

  • Is there pakages you can buy for itunes like 20 songs for $10

    Was wondering if there were packge deal you can buy here instead of buying .99 a song

  • Forecast and actual view in PPB

    Hi experts Despite selection of forecast and actual dates in Set of Dates/View in PPB, i am unable to see the horizantal bars for forecast and acutal dates for activities. (Able to see only basic and start/finnish of activities can be seen) My intent

  • Invoice simulation issue

    Dear Gurus, PO has has raised for 4 items each with Qty 500 item1 500 qty   value 4990 Eur item2 500 qty    value 4990 Eur item3 500 qty    value  460 Eur item4 500 qty     value 460 Eur GR happened for item1 491 qty   value 4900.18 Eur item2 500 qty