Multiple RFSG instantiations?

I'm trying to run a simple VI that generates signals on two RFSG units (sine wave and a square wave) in a PXI chassis.  I've done this before without any problem.
I've noticed before that for some reason LabView will create multiple instantiations of the RFSG (i.e. the RFSG is named in MAX "RFSG1" so it will create "RFSG1 (1)...") and now all the sudden I am unable to run my VI since the 2nd RFSG continues to randomly link to "RFSG2 (15)", etc. when it finishes the Initiate VI and not what I input on the front panel, "RFSG2."
Any suggestions or help for removing these ghost instantiations?  Thanks.

Hi Snuzzbff,
This problem occurs when you open a session reference with a device and don't close the reference to the instrument handle at the end of your application.  It will open additional instances of that resource.  To correct this you need to first make sure that you are calling niRFSG close.vi at the end of your application to close that reference.  This is demonstrated in our examples that can be found in the example finder (Help » Find Examples » Hardware Input and Output » NI-RFSG.  Since you already have created many references, you will need to correct the situation by closing these references.  All you need to do is place a niRFSG close.vi down on the block diagram in a blank vi and create a constant on the instrument handle pin.  Select the instances (in the constant) you want closed such as "RFSG2 (15)" and run the application and it will close that reference.  You can do this for all instances of the reference handle.  Please let me know if this doesn't correct the situation.
I hope this helps,
Paul C.

Similar Messages

  • Instantiation can be multiple movieclips with a loop?

    I would like to know how I can instantiate multiple objects with a for
    for example my code I created six squares of different colors and have instantiated with the name "cubeA, B, C, D, E, F"
    apart in their xy position attribute I have given a value to each aparesca to me on the stage but in those cordenadas And always add +25 to make aparescan top of each other but can see each one.
    Code 1:
    var Cube1:CubeA = new CubeA();
    Cube1.x = 40
    Cube1.y = 140
    addChild(Cube1)
    var Cube2:CubeB = new CubeB();
    Cube2.x = 65
    Cube2.y = 140
    addChild(Cube2)
    var Cube3:CubeC = new CubeC();
    Cube3.x = 90
    Cube3.y = 140
    addChild(Cube3)
    var Cube4:CubeD = new CubeD();
    Cube4.x = 115
    Cube4.y = 140
    addChild(Cube4)
    var Cube5:CubeE = new CubeE();
    Cube5.x = 140
    Cube5.y = 140
    addChild(Cube5)
    var Cube6:CubeF = new CubeF();
    Cube6.x = 165
    Cube6.y = 140
    addChild(Cube6)
    I want to achieve is to instantiate all objects with a name but for each class must be contained in an array
    something like this:
    var McCubeClassName:Array;
    McCubeClassName = [CubeA,CubeB,CubeC,CubeD,CubeE,CubeF]; // Mcs of Cube
    for (var i = 0; i<=McCubeClassName.length; i++)
      cube[i].x = 40
      cube[i].y = (i * 16) + 10;
      addChild(Cube[i])
    what I want is to do the quotas instantiated one by one but this time using a for to make it faster and write fewer lines of code, because I have to do something simimar for a card game but not 54 letters are 100, they know that it is 100 times declare code 1, I'm going crazy!

    I don't see why you need to start out with the Class names as strings. I use code very similar to Jennifer's regularly.
    Jennifer, have you tried your code? If so, where is it failing?
    Note that if you're going to use getDefinitionbyName(), you need something like this:
    try {
         var cube:BaseCube = new c() as BaseCube;//note that the only thing that should begin with caps are Class names and constants
    } catch (e:Error) {
         trace('The library did not contain a definition for ' + yourClassNameString);
    Otherwise when you get errors it will prevent your swf from running.
    Oh, I see why your iriginal code didn't work now. You need to change
    for (var i = 0; i<=McCubeClassName.length; i++) 
      cube[i].x = 40 
      cube[i].y = (i * 16) + 10; 
      addChild(Cube[i]) 
    to
    //Note I also changed the name of your mcCubeClass variable to reflect best practice and what it does.
    var cube:Array = [];//not sure if this is what you want, but this is how you are using it
    for (var i = 0; i<mcCubeClass.length; i++) 
         var newCube:BaseCube = new mcCubeClass();
         cube.push(newCube);
      cube[i].x = 40 
      cube[i].y = (i * 16) + 10; 
      addChild(cube[i]) 

  • Template instantiation and multiple binaries in same directory

    Forte C++ 5.3
    Solaris 8 w/Recommended Patch Cluster: Mar 20/03
    Several ACE [see http://www.cs.wustl.edu/~schmidt/ACE.html] Makefiles direct the creation of multiple binary executables in the same directory. My build [i.e. GNU make] of ACE test programs results in successful creation of only the first of the multiple binaries. All binaries after the first have link errors. The link errors seem to be caused by the linker's failure to pick up template instantiations the were already created when the first binary was compiled and linked.
    The $64000 question seems to be: Why does Forte's link line include the appropriate file from the template repository in the first case but not in subsequent cases? The first of the executables, MCast_Fragment_Test, links correctly because the linker picks up the singleton_ instantiation from the template repository - you can see this with the "-verbose=template" switch. However, the second of the test executables, RMCast_Reassembly_Test, fails to link because the same singleton_ instantiation [i.e. the same file] is not picked up:
    % export ACE_ROOT=/tools/pkg/ace/ace5.3.1-sunc++/ACE_wrappers
    % cd $ACE_ROOT/tests/RMCast
    % gmake CCFLAGS="-verbose=template -fast -O3" exceptions=1
    shared_libs=1 static_libs=1 threads=1 distrib=1
    CC -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I/tools/pkg/ace/ace5.3.1-sunc++/ACE_wrappers
    -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -c
    -o .obj/RMCast_Fragment_Test.o RMCast_Fragment_Test.cpp
    o o o
    "../test_config.h", line 314: Information: Instantiating
    ACE_Singleton<ACE_Test_Output, ACE_Null_Mutex>::singleton_.
    ccfe: Information: Invoking:
    "/tools/forte_c++/SUNWspro/bin/../WS6U2/bin/CC
    -ptd/tmp/03764.TEMPLATE_FILE.s
    -ptc/tmp/03764.TEMPLATE_FILE.ir
    -o $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_z/\
    temp.shuriken.3767.zr7WQNsTBFiWx9j3KXv3.o
    -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -I$ACE_ROOT
    -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -c ".
    o o o
    CC -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I$ACE_ROOT -DACE_HAS_EXCEPTIONS -D__ACE_INLINE
    -mt -xildoff -L$ACE_ROOT/ace -L./
    -o RMCast_Fragment_Test .obj/RMCast_Fragment_Test.o
    -lACE_RMCast -lACE -lsocket -ldl -lnsl -lgen -lposix4
    CClink: Information: Invoking:
    "/tools/forte_c++/SUNWspro/bin/../WS6U2/bin/CC
    -ptl -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I/tools/pkg/ace/ace5.3.1-sunc++/ACE_wrappers
    -DACE_HAS_EXCEPTIONS
    -D__ACE_INLINE__ -mt -xildoff
    -L/tools/pkg/ace/ace5.3.1-sunc++/ACE_wrappers/ace
    -L./
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_N/ND6YV9mCPjF6W_mdb9HD.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_W/Wo599T9ON0ragDRfBzx1.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_0/0K1qNfk0TfJC_d7Uf0Iy.o
    ### SUCCESS: The following object file contains the 'singleton_'
    ### definition. Look for blahblah.zr7WQNsTBFiWx9j3KXv3.o, above.
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_z/zr7WQNsTBFiWx9j3KXv3.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_L/LLYlbLynG-qBErnxnavz.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_2/2nXCDDGsUTu5P0ypRsj6.o
    .obj/RMCast_Fragment_Test.o -lACE_RMCast -lACE -lsocket -ldl -lnsl
    -lgen -lposix4 -o RMCast_Fragment_Test ".
    CC -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I$ACE_ROOT -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__
    -c -o .obj/RMCast_Reassembly_Test.o RMCast_Reassembly_Test.cpp
    CC -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I$ACE_ROOT -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -mt -xildoff
    -L$ACE_ROOT/ace -L./
    -o RMCast_Reassembly_Test .obj/RMCast_Reassembly_Test.o
    -lACE_RMCast -lACE -lsocket -ldl -lnsl -lgen -lposix4
    CClink: Information:
    Invoking: "/tools/forte_c++/SUNWspro/bin/../WS6U2/bin/CC -ptl
    -verbose=template -fast -O3 -I..
    -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION
    -I$ACE_ROOT -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -mt -xildoff
    -L$ACE_ROOT/ace -L./
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_N/ND6YV9mCPjF6W_mdb9HD.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_W/Wo599T9ON0ragDRfBzx1.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_0/0K1qNfk0TfJC_d7Uf0Iy.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_L/LLYlbLynG-qBErnxnavz.o
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_2/2nXCDDGsUTu5P0ypRsj6.o
    ### FAILURE: No blahblah/CC_obj_z/zr7WQNsTBFiWx9j3KXv3.o among the
    ### above object files pulled from the template repository.
    .obj/RMCast_Reassembly_Test.o -lACE_RMCast -lACE -lsocket -ldl -lnsl
    -lgen -lposix4 -o RMCast_Reassembly_Test ".
    Undefined first referenced
    symbol in file
    ACE_Singleton<ACE_Test_Output,ACE_Null_Mutex>::singleton_
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_L/LLYlbLynG-
    qBErnxnavz.o
    [Hint: static member
    ACE_Singleton<ACE_Test_Output,ACE_Null_Mutex>::singleton_ must be
    defined in the program]
    ld: fatal: Symbol referencing errors. No output written to
    RMCast_Reassembly_Test
    gmake: *** [RMCast_Reassembly_Test] Error 1
    FYI - A manual relink of RMCast_Reassembly_Test while explicitly
    specifying
    $ACE_ROOT/tests/RMCast/.obj/SunWS_cache/CC_obj_z/zr7WQNsTBFiWx9j3KXv3.
    o successfully created the executable.
    Additional Info: If I swap RMCast_Fragment_Test with RMCast_Reassembly_Test in the build order, i.e.:
    BIN = RMCast_Fragment_Test \
    RMCast_Reassembly_Test \
    becomes
    BIN = RMCast_Reassembly_Test \
    RMCast_Fragment_Test \
    then RMCast_Reassembly_Test links correctly, but RMCast_Fragment_Test
    doesn't.
    Generalization: In all cases, the first binary links successfully
    while subsequent binaries fail to link successfully.
    Regards,
    ... Dave

    Thank you for your reply, but it raises some questions:
    (1) There are people doing regular builds of ACE [see http://tao.doc.wustl.edu/scoreboard/ace.html] using Solaris-8/Forte, but my particular issue is not one that they see. They use the same Makefiles, so why do they not experience the same problem?
    (2) You acknowledge that my observations are consistent with expected behaviour, but who expects that behaviour? Does Sun not accept that this behaviour amounts to a bug?
    (3) Your suggested workarounds are appreciated, but there may be additional options. The more I know about the template related mechanisms employed by the compiler and linker, the better I am able to identify alternative workarounds. For example, after linking a binary, could I touch(1) one or more files in the template repository to positively effect the outcome for building the next binary?
    Regards,
    ... Dave

  • Multiple instantiations of the same object

    Can someone please explain to me the difference of these two circumstances upon the JVM:
    1) I declare an object outside the loop and instantiate a new object on each iteration of the loop
    Object obj = null;
    for (int i = 0; i < 6; i++) {
        obj = new Object();
    }2) I declare and instantiate the object inside the loop only
    for (int i = 0; i < 6; i++) {
        Object obj = new Object();
    }I assume in the first example that I am reserving memory space and overwriting it on each iteration, whereas in the second example I am reserving and consuming a new memory space on each iteration.
    If that assumption is correct, which is the more efficient? Wouldn't option 1 be easier on garbage collection?

    I compiled both cases using Sun javac (1.4.1) and used javap to view the compiled code. It looks the same to me. Here's the compiled code (for the loop) for the first case   2 iconst_0
       3 istore_2
       4 goto 18
       7 new #2 <Class java.lang.Object>
      10 dup
      11 invokespecial #1 <Method java.lang.Object()>
      14 astore_1
      15 iinc 2 1
      18 iload_2
      19 bipush 6
      21 if_icmplt 7
      24 returnHere's the compiled code the second case   0 iconst_0
       1 istore_1
       2 goto 16
       5 new #2 <Class java.lang.Object>
       8 dup
       9 invokespecial #1 <Method java.lang.Object()>
      12 astore_2
      13 iinc 1 1
      16 iload_1
      17 bipush 6
      19 if_icmplt 5
      22 return

  • Multiple logins on one account...

    Is there any way to have multiple login/passwords connect to the same account in the Room Console?
    Is the login/password tied to a particular account URL? Or can I setup two accounts to access the same account URL?
    thanks
    -sandy

    hi Nigel,
    We have multiple developers working on a project and the Room Console is a great asset in debugging. Right now we are just sharing one login, which isn't ideal, but isn't the end of the world either.
    I think the best solution is probably to build out the Local Server so that it has a RoomConsole. (And can be instantiated from AS3 for unit tests.)
    What is the workflow that you guys use for development? Do you use the LocalServer or do you use a server? Or do you have some internal tools that you haven't shared yet?
    -sandy

  • Managing sole iTunes library with multiple machines on-the-go with database&media on external drive?

    Hi fellows. Trying to organize & revamp my iTunes library & wish to achieve a configuration but lack the expertise to achieve it. My objectives are:
    Objectives
    +1. for my multimedia content to be stored/accessed from an external hard disk+
    +2. to keep the entire iTunes multimedia & all necessary operating files as self-contained as possible,+
    +3. Allow multiple machines to manage import of new content into library, i.e. download new episodes of podcasts, rip new music & movies into the library, sync-ing of iPod even when said machine is nowhere near my external hard disk (this is the tricky one)+
    _Justification for my objectives_
    For objective #3, it's not that I'm trying to be funny. My use case is I've 1 laptop (main machine & always at home) & 1 netbook (brought to school daily). Most of my iTunes usage will be via the stay-at-home laptop; but I may wish to add/manage new content onto my iTunes library/iPod while I'm outside (hence, decoupled from my external hard disk at home).
    I'm not trying to be funny for objective #1 either. I wish to have a streamlined process of retaining & re-instating my iTunes library meta-data across system re-format, i.e. where the iTunes library db files' location may be changed (most obvious being the new "My Music" folder path in Win7 from WinXP)
    _What I'm well aware of_
    I understand that storing/re-locating multimedia on external hard disk is no-kick to iTunes veteran. I also understand that after a new installation of iTunes, I can move the fresh copy of "iTunes_library.itl" & "iTunes_library.xml" files to my external volume & point iTunes to their new address from the 2nd launch onwards. I also understand any new machines I introduce into my environment can be directed to that exact copy of iTunes library database files when I install iTunes & pressing "Shift" key upon their launch. Lastly, I also understand that I will have no access to my multimedia files (for playback) while I'm outside, but I can still add new content, & download new podcasts & remove old content from my library/iPod
    _The question_
    However, what I have difficulty achieving, is launching iTunes on my on-the-go machine(s), without a local copy of the iTunes library database files. I doubt iTunes will be able to launch at all, & if I create a new library (just to launch iTunes), it will not possess content from my main media collection & likely to wipe out my iPod.
    _My novice attempt & its inadequacies_
    My 1st instinct, is to have the iTunes library database files stored in the cloud. More specifically, I can store them files in my DropBox folder/account, & have every machine update to a single latest version of iTunes library database files upon Internet connection. However, this method depends on:
    +* the DropBox application to exist forever,+
    +* assumed the installation path of DropBox (or any applications for that matter) to persist/remain unchanged across future versions of operating systems,+
    +* Will corrupt any un-sync-ed version of my iTunes library database files when I launched iTunes without 1st updating the local cached copy of them database files (suppose I manage my iPod playlists via iTunes on a plane)+
    _Open for recommendations_
    So here I'm, all ears to any fine recommendations you iTunes veterans have to offer. Thanx in advance.

    In case anyone is interested in these sorta thing:
    UPDATE #4: Unfortunately, if you discover you tagged something wrong after importing the songs, even when you correct the tags, iTunes will not re-organize the folder hierarchy, as long as “Keep iTunes Music folder organized“ is UNchecked, even if the songs were imported via the “Automatically add to iTunes folder” channel.
    Example: I imported a folder of Andy Lau songs into my library, unbeknownst to me, some of the songs had their “Artist” tagged as “Andy Lau“, while some had theirs tagged as “Liu De Hua“. Naturally, the 1st time round I imported them, 2 separate folders were instantiated as to iTunes, those were names of 2 distinct artists (this is expected, & acceptable behaviour). The downside is, even if I re-tagged all those songs with “Andy Lau” as the artist, iTunes will no longer re-organize & consolidate all them songs into a single “Andy Lau” artist folder (because I’d “Keep iTunes Music folder organized” UNchecked remember?)
    Well, you may suggest that I check that option when managing my future library & uncheck it right before launching/using my main, current library. The thing is, iTunes preferences persist across libraries, & one day I will forget to uncheck that option, launch my main library & lose all my current music folder structure to iTunes’ re-organization (which I don;t want, as of yet). Which brings me to another update:
    UPDATE #5: My future iTunes library has “I:/iTunes_Media” as iTunes’s “Home” folder. This setting persists even when I switch back to my main, current library. Which means, if I’d my external volume connected while launching/using my main, current library, all new content will end up in that folder on the external volume! Which messes up the whole scheme of things! Arghz!
    UPDATE #6: Here’re some updates with regards to ID3 tags:
    * the “Album Artist” in Windows (7) Explorer = the “Album Artist” field in iTunes 9
    * Modifying a ID3 tag field using Windows (7) Explorer will update BOTH the v1 & v2.3 version of the ID3 tags on the song (if the song has both versions of tags embedded & if the field exists in both tag versions). If you update the tags via iTunes, only the v2.3 tags get updated. This is surprising.
    * the “Contributing Artist” field in Windows (7) Explorer = the “Artist” field in iTunes 9 & the “Artist” field in ID3v1 tags (changes in tany of the 3 fields will affect the other 2 respectively)
    o However, iTunes Media folder organization will only adhere to the value saved in the “Album Artist” field [if you change the value of "Contributing Artist" in Windows (7) Explorer, the "Artist" field in iTunes or the "Artist" field in a song's ID3v1 tags, no folder re-organization will occur]
    UPDATE #7: Some updates with regards to workflow:
    Decided to retain all non-music content within a sub-folder named “non-music” beneath the main album folder (& take strict precautions to import songs only). The exception is “m3u” playlist files. Have read elsewhere if you import a folder of songs & there’s an “m3u” playlist inside, your library may have duplicates and/or the tags of those songs you just imported could be screwed, etc.

  • Triggering a sub work flow for multiple users at same time.

    I have a scenario in which I have created sub workflow as an activity for approval process. This sub work flow should be triggered for multiple users at the same time and their decison is independent of each other.
    This is like creating multipe instance of the same sub work flow and then the sub work flow runs indepedently as a new work flow for each of the approver and the process is completeded for approver independently.
    How can this be achieved?

    Tyr to do like this,
    1. First include the subworkflow in the main workflow template.
    2. Now include standard Block Step in the main workflow template.
    3. In the block select the block type as ParForEach.
    4. Before doing the 3rd point make sure that all the agents for whom you want whom you want to initiate the workflow, populate them in a Multiline conatiner element.
    5. Once completing 3rd and 4th points open the block step under the tab ParallelProcessing  assign the multiline container element name in the   for e;g if the multi line container element name is COSTCENTER then do the binding like below. the conatiner element COSTCENTERLINE is created by default once you include the multi line conatiner element under parller processing tab.
    &COSTCENTER[&_WF_PARFOREACH_INDEX&]&   -------->     &_COSTCENTER_LINE&
    Now assign the agent of the subworkflow as COSTCENTERLINE , imean if suppose you have 3 entries in the internal table then three separate and for three different agents the workflow is instantiated.

  • How to create multiple TYPES of objects from one menu?

    Q: How can I create a single class to create objects of multiple 'object classes' in a way that is not a huge switch statement?
    Explaination:
    Let's say that I have an application that I am building, that manages five hundred object types. A properly-built object subclassing tree is created, and I want to be able to create objects of any 'leaf node' of this subclassing tree using a single 'objectCreate()' method in a 'factory object'. The purpos of this method will be to create an instance of the correct object, pass a handle to a few collections for properly sorting and storing these objects in groups.
    Usually, one could create a switch in this function, testing for the type of object that the user wants to create from the menu. But in the case of having hundreds of possible object choices, this becomes harder and harder code to maintain (let alone performance).
    Any suggestions?

    But if my menu has:
    1. German Shepard
    2. Doberman Pinscher
    3. Malamut
    4. Persian Long-hair
    5. Siamese
    6. Tabby
    And my object class tree goes:
                                  [ Animal ]
                 [ Cat ]                              [ Dog ]
      [ various breeds ]                         [ various breeds ]How do I code the menu class to respond to the input, so that it runs the correct [breed] object's constructor?
    The line:
    Animal choice = new xxxxxxxx();
    I can't use a variable to replace 'xxxxxxxx' in run-time, but having a ton of choices in code sounds/looks unreasonable.
    if (choice == "Doberman Pinscher")
    Animal choice = new doberman();
    else if (choice == "Tabby")
    Animal choice = new tabby();
    Do you see what I am trying to avoid? I am not experienced enough to instantly realize how to avoid the latter, and instead, do a single instantiation command for the correct constructor.

  • Finalize() method being called multiple times for same object?

    I got a dilly of a pickle here.
    Looks like according to the Tomcat output log file that the finalize method of class User is being called MANY more times than is being constructed.
    Here is the User class:
    package com.db.multi;
    import java.io.*;
    import com.db.ui.*;
    import java.util.*;
    * @author DBriscoe
    public class User implements Serializable {
        private String userName = null;
        private int score = 0;
        private SocketImage img = null;
        private boolean gflag = false;
        private Calendar timeStamp = Calendar.getInstance();
        private static int counter = 0;
        /** Creates a new instance of User */
        public User() { counter++;     
        public User(String userName) {
            this.userName = userName;
            counter++;
        public void setGflag(boolean gflag) {
            this.gflag = gflag;
        public boolean getGflag() {
            return gflag;
        public void setScore(int score) {
            this.score = score;
        public int getScore() {
            return score;
        public void setUserName(String userName) {
            this.userName = userName;
        public String getUserName() {
            return userName;
        public void setImage(SocketImage img) {
            this.img = img;
        public SocketImage getImage() {
            return img;
        public void setTimeStamp(Calendar c) {
            this.timeStamp = c;
        public Calendar getTimeStamp() {
            return this.timeStamp;
        public boolean equals(Object obj) {
            try {
                if (obj instanceof User) {
                    User comp = (User)obj;
                    return comp.getUserName().equals(userName);
                } else {
                    return false;
            } catch (NullPointerException npe) {
                return false;
        public void finalize() {
            if (userName != null && !userName.startsWith("OUTOFDATE"))
                System.out.println("User " + userName + " destroyed. " + counter);
        }As you can see...
    Every time a User object is created, a static counter variable is incremented and then when an object is destroyed it appends the current value of that static member to the Tomcat log file (via System.out.println being executed on server side).
    Below is the log file from an example run in my webapp.
    Dustin
    User Queue Empty, Adding User: com.db.multi.User@1a5af9f
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    Joe
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin pulled from Queue, Game created: Joe
    User Already Placed: Dustin with Joe
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    INSIDE METHOD: false
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    User Dustin destroyed. 9
    User Joe destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    It really does seem to me like finalize is being called multiple times for the same object.
    That number should incremement for every instantiated User, and finalize can only be called once for each User object.
    I thought this was impossible?
    Any help is appreciated!

    Thanks...
    I am already thinking of ideas to limit the number of threads.
    Unfortunately there are two threads of execution in the servlet handler, one handles requests and the other parses the collection of User objects to check for out of date timestamps, and then eliminates them if they are out of date.
    The collection parsing thread is currently a javax.swing.Timer thread (Bad design I know...) so I believe that I can routinely check for timestamps in another way and fix that problem.
    Just found out too that Tomcat was throwing me a ConcurrentModificationException as well, which may help explain the slew of mysterious behavior from my servlet!
    The Timer thread has to go. I got to think of a better way to routinely weed out User objects from the collection.
    Or perhaps, maybe I can attempt to make it thread safe???
    Eg. make my User collection volatile?
    Any opinions on the best approach are well appreciated.

  • Unable to access multiple records

    HI all,
    I am trying out with a BPEL process , which invokes an db adapter(used to configure a table by the name employee) and this adapter retrieves some of the records with empid, empsal as the fields, based on the condition where empid=1001(records range from 1001 to 1010(say)). once the records are fetched , all that I want is that all the salary details of employees , whose empids are less than 1005 should be displayed.. for that what I ve done is that once records are fetched , I ve put a while condition(condition:invokes_output<1005)
    and I ve used an assign inside while, creating two copyoperations(like invokes_output+1 to invokes_output(empid), for loop condition) and the other copy operation is just assigning the invoke's_output/empcollection/empsal 'to' result
    Its getting compiled but once the instance is instantiated, I am getting an error some thing like
    [2008/04/08 15:56:00] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    -<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>
    XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /ns4:EmployeeCollection/ns4:Employee/ns4:empsal should not return multipe nodes.
    Please check the BPEL source at line number "97" and verify the part and xpath query /ns4:EmployeeCollection/ns4:Employee/ns4:empsal.
    </summary>
    </part>
    </selectionFailure>
    Can any one help how do I go about this.. All that I want is I need to display the salary details while using the while loop.. and my Audit instance looks like this
    [2008/04/08 15:56:00] New instance of BPEL process "A_Whilecheck" initiated (# "201225").
    <process>
    <sequence>
    receiveInput
    [2008/04/08 15:56:00] Received "inputVariable" call from partner "client" More...
    -<inputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    -<ns1:A_WhilecheckProcessRequest xmlns:ns1="http://xmlns.oracle.com/A_Whilecheck">
    <ns1:input>1001
    </ns1:input>
    </ns1:A_WhilecheckProcessRequest>
    </part>
    </inputVariable>
    Assign_1
    [2008/04/08 15:56:00] Updated variable "Invoke_1_xxxxSelect_empno_InputVariable" More...
    -<Invoke_1_xxxxSelect_empno_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="xxxxSelect_empno_inparameters">
    -<xxxxSelect_empnoInputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/xxxx">
    <empno>1001
    </empno>
    </xxxxSelect_empnoInputParameters>
    </part>
    </Invoke_1_xxxxSelect_empno_InputVariable>
    Invoke_1
    [2008/04/08 15:56:00] Invoked 2-way operation "xxxxSelect_empno" on partner "xxxx".less
    -<messages>
    -<Invoke_1_xxxxSelect_empno_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="xxxxSelect_empno_inparameters">
    -<xxxxSelect_empnoInputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/xxxx">
    <empno>1001
    </empno>
    </xxxxSelect_empnoInputParameters>
    </part>
    </Invoke_1_xxxxSelect_empno_InputVariable>
    -<Invoke_1_xxxxSelect_empno_OutputVariable>
    <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
    </part>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EmployeeCollection">
    -<EmployeeCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/xxxx">
    -<Employee>
    <empid>1004
    </empid>
    <empsal>23000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1002
    </empid>
    <empsal>1120000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1005
    </empid>
    <empsal>4300
    </empsal>
    </Employee>
    -<Employee>
    <empid>1003
    </empid>
    <empsal>45000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1006
    </empid>
    <empsal>12900
    </empsal>
    </Employee>
    -<Employee>
    <empid>1007
    </empid>
    <empsal>12400
    </empsal>
    </Employee>
    -<Employee>
    <empid>1010
    </empid>
    <empsal>1110
    </empsal>
    </Employee>
    -<Employee>
    <empid>1009
    </empid>
    <empsal>1200
    </empsal>
    </Employee>
    -<Employee>
    <empid>1008
    </empid>
    <empsal>34000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1011
    </empid>
    <empsal>65000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1013
    </empid>
    <empsal>12000
    </empsal>
    </Employee>
    -<Employee>
    <empid>1012
    </empid>
    <empsal>12000
    </empsal>
    </Employee>
    </EmployeeCollection>
    </part>
    </Invoke_1_xxxxSelect_empno_OutputVariable>
    </messages>
    <while>
    Assign_2 (faulted)
    [2008/04/08 15:56:00] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
    -<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    -<part name="summary">
    <summary>
    XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /ns4:EmployeeCollection/ns4:Employee/ns4:empsal should not return multipe nodes</part>
    </selectionFailure>
    </while> .
    Please check the BPEL source at line number "97" and verify the part and xpath query /ns4:EmployeeCollection/ns4:Employee/ns4:empsal.
    </summary>
    </sequence>
    [2008/04/08 15:56:00] "BPELFault" has not been caught by a catch block.
    [2008/04/08 15:56:00] BPEL process instance "201225" cancelled

    Hi,
    Please some one answer my post.....I am really in urgent requirement.

  • Add multiple objects to a Deque to be retrieved in that order?

    All:
    We are using a LinkedBlockingDeque in a classic producer/consumer setup -- multiple threads may post "commands" to the Q, and the consumer retrieves and executes each command in a separate thread.
    We have very rare cases where we need to post more than 1 command which must be executed by the consumer in the order posted (with no intervening commands).
    Something like addAll(Collection c) represents what we need, but as far as we know does not guarantee that all of the elements in 'c' will be added to the Deque without the presence of intervening elements being posted from other threads. (If this understanding is not correct, then addAll(..) does what we want and there is no problem.)
    We understand that we could use a LinkedList with a concurrency wrapper, and handle synchronization where required. But do really like the functionality provided by a LinkedBlockingDeque and hate to have to handle all the complexity in our own code. (Not to mention the ton of existing code that would have to be retrofitted!)
    We also understand that we can define a new "commandSet" object which represents the list of primitive commands that must be processed in order. But this also seems like a lot of unnecessary clutter.
    Is there another way to pass a set of "commands" into the Deque and be assured that they will be retrieved in that order by the consumer?
    If there is no such mechanism, would it be worth requesting such an enhancement -- something like addAllTogether(Collection c) which would synchronize internally so that all the elements in 'c' are added in sequence?
    Thanks.

    Thanks for your response, and yes you are correct -- CommandSet is misleading and it should have been CommandList.
    It still seems to me that in general with all the Concurrent... implementations it might be useful to have some form of atomic addAll(Collection c) method -- maybe addSynchronized(Collection c). (There's got to be a better name!)
    This method would guarantee that all of the elements of 'c' are added to the Concurrent.... object without any conflicting adds or removes posted by any other thread.
    I understand the CommandList construct, and this is in fact how we resolved the issue. But in general this has some limitations. Using a Deque as an example, but applying this to all Concurrent.... classes:
    1) Our design is not as clean as the structure you have in your response, and it really can't easily support that type of interface. The purpose of the Consumer is to interrogate each X in the queue, and act as an interface to "perform" that logical operation on a specific device. So it invokes many methods of X in order to perform it's job. I.e. are you inbound or outbound, how much data, what device address should this go to, etc, etc.
    I also understand that we could define another interface and pass an 'execute' object into the 'execute' method -- something like 'execute(theExecuteInstance(this))' to get around this -- but now we're really starting to add complexity!
    2) You are now adding a different object type to the Deque. If it was instantiated as, say LinkedBlockingDeque<X> then the only way to add a List of X objects is to declare class ListOfX extends X which would really be a confusing structure. This one has kludge stamped all over it! (But, hey, that's what we did!)
    3) Clearly, the whole approach only works if you have access to the code for the Consumer side and can modify it to understand the ListOfX instance and handle it correctly.
    If we had realized at the start that the situation would arise in which multiple Xs would need to be Consumed in sequence, then we would have defined ListOfX (more cleanly than above) and declared the Deque as LinkedBlockingDeque<ListOfX>, and written the Consumer to handle this.
    But as happens so often, we were well down the road before this situation arose .... with the inevitable patchwork solution.
    On the other hand, you could probably still make a case for some form of addSynchronized in general. It does seem like a natural situation that should be supported cleanly.
    If we weren't using a Concurrent ... object, and handling our own synchronization, then this structure follows naturally because you would just synchronize on the object, run an iterator through 'c' and add each instance returned. With one of the Concurrent... objects, this pattern has been lost.
    Even if we had realized the need earlier, and defined a ListOfX right from the start, it still clutters up the situation (the Consumer really just wants to process X's), and adds the overhead of instantiating ListOfX, and adding a single X to the list, for 99% of the actual cases.
    But thanks for your response and insight. Maybe next time we'll figure out all the use cases before we start (LOL).

  • How to create multiple component instances at runtime using java

    Hi,
    I need to create component instances at runtime using java.I found ComponentSet.add method.But I am not finding a way to get handle of ComponentSet.
    I see methods with params of IRuntimeNode.But how to get ComponentSet from IRuntimeNode.
    If anybody knows or have sampel code then please share with me.
    thanks,
    ashok

    Ashok --
    This is a common challenge for those using Configurator Extensions with multiple instantiation for the first time. The problem is that the CIO's representation of the structure for multiply-instantiable Components differs slightly from what both Configurator Developer users and Configurator Runtime users see in those respective applications. Multiply-instantiable Components are not direct children of the Model in which they're defined. Internally, there is an entity that sits between the parent Model and the instantiable Components; that intermediate entity is the ComponentSet object you've found in the CIO documentation.
    If the name of your multiply-instantiable Component is "My Component", then its ComponentSet may be accessed simply by calling getChildByName("My Component") on its parent Model; a List of the instantiated Components may be accessed with the ComponentSet's getChildComponentNodes() method, and instances may be added and deleted using its add() and delete() methods.
    Hope this helps.
    Eogan

  • Multiple selection in the ALV is not possible after system upgrade

    Hi Colleague,
    I had been using an ALV, which was performing as desired before, but recently we had a system upgrade to NW7.0 and after that in this ALV multiple selection of records/rows is not allowed.
    The colleagues who upgraded the system suggested that this may be because this ALV is instantiated at many places. I would request you to kindly provide a solution for the same ASAP, as I am not able to proceede ahead.
    Warm regards,
    Roopesh

    Hi all,
    Thanks for your replies, I had figured out the actual problem. The reason was, the referance of the selected rows was lost as I was doing bind elements to the context after moving to wddomodify.
    So I figured out an alternative solution to avoid binding on selection of records.
    Best regards,
    Roopesh
    Edited by: Roopesh Dolle on Apr 14, 2011 7:04 AM
    Edited by: Roopesh Dolle on Apr 14, 2011 7:05 AM

  • Instantiated subforms disappear after save?

    Hello,
    In a certain project I use several PDF-forms containing subforms instantiated by users when they need to fill in multiple blocks of similar data. This instantiating is done by using scripts calling the instanceManager. This works fine so far! Now I just noticed a problem with solution:
    Whenever such a form is saved as PDF (manually in Reader, but also by e-mail submit), all instantiated subforms (and the data it contained) disappeared as soon as the PDF is closed and reopened. Only the first (default) instance of the subform remains. The strangest thing is: when the same from is submitted as XML, all data blocks are stored just like expected.
    (The form is saved as a Dynamic XML form. These forms are created with LiveCycle Designer ES (8.1))
    This doesnt occur on just a single form, but on all of my forms containing instantiated subforms. So I guess Im doing something wrong, but what? Has anyone an idea why this happens... or better: does anyone has a solution?
    Thanks in advance for any help!
    Kind regards,
    Edgar

    Hello Edgar,
    I have never faced with that problem. Is your subform instances binded to schema or anything else?
    While I am creating repeated instances of a subform;
    1. Create a subform1, put the fields and delete button inside this subform.
    2. Make subform1 flowable layout western.
    3. Pagination stays same (Place:Following Prev, After: Continue Filling Parent)
    4. In Binding tab of subform1, Select "Repeat subform for each data .." and select min count as 1.
    5. In the "Add" buttons script, I enter subform1.instanceManager.addInstance(0); in Javascript.
    6. In "Delete" button subform1.instanceManager.removeInstance(this.parent.index);
    7. Also you can bind the subform to unbounded element in your sema (...coll[*])
    8. It works well.
    If you apply like these and same problem occurs, you can check the versions of your reader or acrobat.
    Hope helps,
    Asiye

  • GPs in multiple server environment

    Hi,
    Does anyone have experience using GP in a multiple WAS server environment.  Our scenario is one in which different servers have different user groups and are located in different regions.  We want to have a GP be able to transfer a process to another user group on another server and have the process flow continue there.
    Is there something available "out of the box" or is it necessary to develop custom code (in all likelihood based on web-services)?
    Thanks.
    Dick

    Hi Dick,
    This is an interesting problem that you have.
    There is no out of the box solution for this, but you may be able to architect this in a way that it would not require any custom code.
    If you created a GP process for every region, which in all make up the logical super GP process, you can transfer process state and perform instantiation from one to the other.
    For instance:
    Process 1 (Region US, Server 1) upon completion starts Process 2 (Region EMEA, Server 2).  The last step (Action) of Process 1 would be a Web Service Callable object which starts Process 2 and passes any PK's for state information. 
    If you are using CAF Entities for persistence, I recommend that you keep these all on the same server and the distributes GP processes can access as needed.
    Does this make sense?
    Best Regards,
    Austin.

Maybe you are looking for

  • F110 SPECIAL G/L POSTING

    When Running F110 i do have some down payment which should be block by the system automatically but problem is that noe the document is not automatically blocked by the system  (ZP) Downpayment items (ZP docs XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXXX ) ar

  • Detect changes in an instance

    Hello, how can I detect changes in an instantiated object? I could serialize the object and write it into a file. After some minutes I could write it a second time into a file. Now I could compare the two files. But I thing this is not the best way f

  • Dial up access crashes after SB Audigy 2Zs installat

    My Audigy 2ZS sound card seems to work fine, although I'm just starting to explore the options. My problem is that since I installed this product, I experience a hard crash (blue screen) whenever I try to go online. I only have dial-up, but both aol

  • 100TX Full Duplex not working forced to 100/half - fixed

    I dont know if everybody figured this out. but I found this info on an old board and it worked for me on my qaud Intel running SL server. First check your Network Utility to see which network interface is active but problamatic. (eg. en0, en1, en2).

  • Sales Order - Acct Assignt Group change

    SD Experts, I have some acct determinations errors, we found out that this was due to Acct Assignment Group field not being maintained at material master. We were able to update this field to all material master, But I still can't process the invoice