Parent class not waiting for child class to finish

hi,
i have class a and method x in class a which calls class b. its fine till there. but before my class b's action is completed, in which i have to choose a file and display those files in jtable, the remaining lines in method x getting executed. what do you think the problem is.
i.e. my parent's class method is completely getting executed before the child class (frame) returns the result and is closed. where do u think the problem.
please help.

i dont know if i made myself clear. i am giving my code below.
class A{
btnClick{
pnlProductsImport _pnlProductsImport=new  pnlProductsImport(dataSource,config,parent,importFile);
_pnlProductsImport.setVisible(true);
_pnlProductsImport.show();
getProducts()
here its showing my pnlProductsImport class screen and before I close that screen, getProducts method is getting executed. as I know, the control passes from class A to pnlProductsImport at show() and when its closed, it will execute remaning lines i.e getProducts, but in this case, it shows the subclass, and immedietly, executing remaining lines. but its also fact that my subclass (pnlProductsImport) implements Runnable, but thread starts only after some time when I click on one of the buttons on the screen.... and i want that getProducts() method to execute only when subclass closes completely.
thanks

Similar Messages

  • [Solved] systemd does not wait for the unit to finish

    My problem is described in the title. I have made a test by enabling the following unit:
    [Unit]
    Description=/etc/rc.local Compatibility
    [Service]
    Type=forking
    ExecStart=/bin/sleep 1000
    TimeoutSec=0
    RemainAfterExit=yes
    After=network.target
    [Install]
    WantedBy=multi-user.target
    The unit is well started (a process sleep 1000 exists). But with a type=forking, systemd is supposed to hang in this case. Instead, the graphical.target is launched, systemctl list-units mention it as dead, but the display manager is started before the sleep 1000 completes. Ho can I force systemd to wait?
    Last edited by olive (2015-03-16 16:49:34)

    olive, now you're making even less sense. I didn't say the sleep example was stupid and I didn't question your reasons for doing/wanting this.
    I suggested you add "Before=display-manager.service" and you respond "I added Before=graphical.target and it didn't change anything."
    I also tried to explain why systemd has no reason to delay the display-manager.service. You could have asked for further clarification, as berbae has now done. Let's try a longer explanation.
    Service startup
    Services can be started in different ways, as configured with Type=. This determines when a service is considered "started" (or when the service's start-up is considered finished). When a service reaches this state (some time after being started), units that are supposed to start After= this service will be started (and no sooner).
    With simple systemd has no further information about the start-up process. It launches whatever you specify in ExecStart and this is the main process that continues to run till the service stops. systemd assumes this type of service is started immediately. All the other types have some way for the process to indicate to systemd (either directly or indirectly) when it has finished starting.
    Actually oneshot is also a bit special and that is where RemainAfterExit comes in. For oneshot, systemd waits for the process to exit before it starts any follow-up units (and with multiple ExecStarts I assume it waits for all of them). So that automatically leads to the scheme in berbae's last post. However, with RemainAfterExit, the unit remains active even though the process has exited, so this makes it look more like "normal" service with
    begin of unit/startup ---- end of startup ------ end of unit
    This is the relevant behavior for this thread. First sleep starts, then after 1000 seconds, start-up finishes and follow-up units will be started. Then either the unit dies, or (with RemainAfterExit) it stays "active".
    The man page describes how "end of startup" is determined for each Type.
    Targets
    Targets are meant to group units together, to provide synchronization points (and replace runlevels). When you start a target, all its units will be started (in parallel if possible). The man page says:
    Unless DefaultDependencies= is set to false, target units will
           implicitly complement all configured dependencies of type Wants=,
           Requires=, RequiresOverridable= with dependencies of type After= if the
           units in question also have DefaultDependencies=true.
    This means that (by default) when a target is requested, all it units are started first. Only after all units have finished starting, the target itself will be started (and since the target doesn't do anything by itself, this startup is basically instantaneous). Without this dependency, the order between the target and its units is unspecified, so in theory the target could finish starting immediately while its units are still being started.
    Back to olive
    graphical.target has these DefaultDependencies, so it is not started until all its units (like display-manager.service) and other After= dependencies (like multi-user.target) have finished starting. Your sleep service has to be started before multi-user.target starts (again due to default target dependencies). So first display-manager and the sleep service are started and after 1000 seconds, the sleep service finishes starting and then (assuming all other dependencies were quicker) multi-user.target is started and graphical.target as well (assuming display-manager didn't need 1000 seconds).
    If you want display-manager.service after the sleep service, add a Before/After line to specify that (this was your original goal and my suggestion).
    olive wrote wrote:However, units that are parts of the graphical target are still launched before the graphical target become active. I am still unable to completely delay the starts of the graphical target before a specific unit completes.
    It should be clear now how this works. "units that are part of the graphical target" can only mean "units that are wanted/required by the graphical target" but that is basically all the units that are started when you boot your system, because multi-user.target is a part of graphical.target. And your sleep service is a part of multi-user.target, so in fact you're saying you want to delay starting the sleep service until the sleep service completes
    What you probably intended was to delay all units that are a part of graphical.target but not of multi-user.target until after the sleep service. I can't think of an easy (or even good) way to do this and this post is already too long, so I'll table that for now.

  • Process chain Error: This AND process is not waiting for event RSPROCESS

    Hi All,
    I am facing an error in the process chain in PRD.
    Error message: This AND process is not waiting for event RSPROCESS.
    We had a process chain which had two sub chains which run parallel and below of this we had AND process type and below of the AND process we had 4 more jobs.
    Once the two subchains got successfully loaded, the and process should turn to green and further 4 jobs should start.
    It is a daily load , it worked fine from past years,but suddenly the AND processtype is getting failed.The thing is in the two subchains if one got completed, the AND process process is not waiting for 2nd subchain to get completed.The AND process is turning to RED (status: cancelled) . I tried to repeat the AND process once after above 2 subchains loaded, but it didnt worked.
    And i removed the existing AND process and created a new one and placed it in same place and activated and schedules again.but still it is getting failed with same error.
    Thanks in advance,
    Sai Chand.S

    Hi,
    If you did any transports related to that metachain we face similar kind of issues.
    not only the AND process , we need to remove all the process before executing the AND process and create it again.
    It helps you, you said your in production So you should take the proper approvals and do it.
    Regards,
    Yerrabelli.

  • Second tween does not wait for first to finish

    Having a little problem here and as far as I can tell it is
    just that the second tween starts before waiting for the first to
    finish. Basically on a click event it should slide out a scroll
    pane to the bottom of the screen, change the contentpath of the
    scroll pane, then slide it back up.
    with the code below it just slides up the new movie clip but
    does not slide out the old one, if i remove the code for the new
    clip to slide up the old one does do the slide out how I want it to
    look.
    how can I make a pause in between the two to wait.
    on (press) {
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    _root.mask._x = 54;
    _root.mask._y = 109.3;
    _root.scroll_pane.setMask(_root.mask);
    switch (_root.loaded_clip)
    case 2: var Slide_out:Tween = new Tween(_root.scroll_pane,
    "_y", Bounce.easeOut, _root.scroll_pane._y, 900, 3, true); break;
    _root.scroll_pane.contentPath = "Search_mc";
    var Slide_up:Tween = new Tween(_root.scroll_pane, "_y",
    Bounce.easeOut, 900, 109, 3, true);
    _root.loaded_clip = 1;
    }

    Its still not working with that code but I think I can muck
    around with it and figure it out, the slide out works on the old
    clip now but then the new one never shows up.
    The onMotionFinished was basically what I was looking for,
    think I can eventually figure it out from here, thanks for the
    info.

  • How can I not wait for a RFC response

    Hi everyone, i want to execute an RFC and not wait for the response, i don´t care, so, is there a way to achieve this ? thanks

    Hello Isaac,
    If you are calling the RFC from WebDynpro then you have to wait for the RFC response. However, there is a way that you can get early response from a RFC.
    Suppose you are using RFC1 in your program and it contains business logic. Now, don't directly call the RFC1, instead, write another RFC2 which calls RFC1 asyncronously. This way, when you call RFC2 it automatically call RFC1 and does not wait for any response for RFC1
    You can call RFC1 from RFC2  asynchronously:
    CALL FUNCTION RFC1 STARTING NEW TASK taskName
    Your WD application will immediately get a response from RFC2 while RFC1 still executing.
    To know more about asynchronous RFC refer [Parallel Processing with Asynchronous RFC  |http://help.sap.com/saphelp_nwpi71/helpdata/en/22/0425c6488911d189490000e829fbbd/content.htm]
    Hope this helps
    Abhinav

  • Thread not waiting for DOS process

    Hi
    In program I am using Threads. Here all threads will start and execute one DOS command. My problem is that all those thread needs to wait for DOS command to finish its process and then only thread should return.
    I have created ThreadGroup and added all threds. And I am checking it by using
    ThreadGroupVar.activeCount()!=0 so that I can come to know all thread processing is over or not.
    Threads are coming back to main process as soon as they start DOS command ..they are just not waiting it to be finish DOS job.
    Please guide me on this
    Regards,
    Niraj

    Create a collection of the Threads then iterate through it using join() on each one. When you have iterated though all the Threads they will all have completed.

  • Parent window not specified for canvas.View

    I am getting the following error in custom form which has developed based on a vennila form QPXPRLST.FMB.
    "Parent window not specified for canvas.View"
    for the following canvases
    1.FOLDER_SORT_DATA
    2.FOLDER_TOOLS
    3.SAVE
    and some more
    According Metalink, Apply a path : 1815485
    But would it support Custom form ??
    Pl give me solution if any body knows

    My Dear Friend,
    For all the canvases, you will have to define the Window property. Since you didn't define the window property for your Login_canvas, you r getting the problem. You must launch the properties window for the canvas and set the window property for the canvas, then you will not get the problem again.
    Regards,
    Senthil .A. Perumal.

  • HP SimplePass not waiting for my finger swipe

    I have the HP SimplePass software installed and the Validity driver installed. The fingerprint reader is enabled and working.
    My problem is that when I go to enrol my finger the software tells me to click on a figer to enroll it, when I click on the finger the software flashes the enrollment screen, with the 0% loading bar on it, then it switches to a message saying "It looks like you are having some trouble. Do you want to try again." I try again and the same thing happens.
    I have made sure the sensor is clean and the blue light beside the sensor is activated. The issue appears to be the program not waiting for me to swipe my finger.
    Any help or ideas as to how to fix this would be much appreciated.
    Thanks in advance.

    Testing123
    Welcome to the HP Community Forum.
    I dislike this series of the Support pages -- there is not a Validity Sensor Driver listed for this Series notebook at the Support pages.  It is not common; it does happen for a few models.
    Reference:
    HP Pavilion dv6-6070ca Entertainment Notebook PC
    The problem is that I cannot verify beyond what I can find elsewhere that your fingerprint reader hardware and your software is indeed compatible -- OR that the advice that I can give you is reasonable.
    If you end up needing a copy of your Validity Sensor Driver, the following appears to be the correct Driver for your System.
    sp55109 Validity Sensor Driver V4.3.205.0
    Commentary
    The message you are seeing is USUALLY an indication of an incompatibility between the Validity Sensor -- either the Driver / hardware and the version of the HP SimplePass program OR the Driver / hardware and some itch in the File system that impacts the way in which the HP SimplePass program is interpreting the Driver information.  This is speculation and based on experience -- I don't have access to the code, to the File System, and I do not work for HP.
    The version level of your Validity Sensor Driver, in and of itself, is adequate to allow you to upgrade to a later version of HP SimplePass than the version available at your computer's Support website.
    Because you did not indicate which version of HP SimplePass you are running, I assume you do not know, or that you are running an older SimplePass program.
    The following might work for you:
    Open the file > Click on Download > Click “Open in Adobe Reader”
    Instructions to Upgrade HP SimplePass
    If your HP SimplePass is not working:
    Start here -- it is possible the issue is not one of anything more than just a bad "tangle":
    See Page 10 of the document (at writing) –
    Follow the Procedure Pile of Rubble - Hard Reset Sequence
    Next
    If no joy, go back and follow:
    Procedure - Update / (Re) Install HP SimplePass
    NOTES:
    You are using HP SimplePass Series 6 >> Ignore references to Series 8
    Pay attention to Order-of-Events
    ==============================================================
    Click the Kudos Thumbs-Up to say Thank You!
    And...Click Accept as Solution when my Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • How do I call the subvi in parallel with main VI. Main vi should not wait for the subvi

    I have a subvi which takes the parameters like port name, transmit rate, message to transmit over serial port and Start/stop flag. This subvi calls VISA write vi in a loop continuously, till the Start/Stop flag is false, to write a message to serial port at a mentioned transmit rate. This subvi will be called from another VI. Actual intension is to transmit different messages to different ports continuously and stop them when required. In this senario, please provide solution for below points:
    1. How do I call the subvi in parallel with main VI. Main vi should not wait for the subvi.
    2. How does main vi can control already running subvi in parallel to it. In the above example I would like to start the subvi from main vi when start\stop flag is true and would like to stop it when the flag is false.
    3. How do I call the subVI with one set of parameters from main vi, when same subVI is running with other set of parameters already from main vi(subvi being called in a case with different set of parameters each time when the case is called). Means, how do I keep track of reentrant subvi (different calls to same vi)from the same main vi.

    Hi Dharani24,
    Try if these are helpful,
    http://digital.ni.com/public.nsf/allkb/DB92C44E7D4D8A1B862577CB007D9C45
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/asynchronous_vi_calls/
    http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/reentrancy/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • Application waits for the thread to finish

    Hi all,
    I have a class let say test that extends Thread.
    In my application i say:
    test Xtest = new test();
    Xtest.start();
    System.out.println("Thread finished");
    I need my application to wait for the thread to finish for it to continue, i.e. in my example print "Thread finished" .
    Can someone help me.
    Thanks in advance for your help.
    Best regards,
    Saadi MONLA

    This should work:
    test Xtest = new test();
    Xtest.start();
    Xtest.join();
    System.out.println("Thread finished");

  • When server start, get "Waiting for another script to finish..." message and doesn't go anywhere.

    Hello, my engineer (Japanese) is trying to start AdobeMediaServer but he got stuck after getting "Waiting for another script to finish..." message. Any idea how to resolve this situation?
    [root@NA1SIBZDH02 /opt/adobe/ams]# ./server start
    NPTL 2.5
    chmod: changing permissions of `./tmp/': 読み込み専用ファイルシステムです
    Waiting for another script to finish...
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]# ls -l
    合計 52324
    drwxr-xr-x 15 ams  ams      4096  9月 11 17:54 Apache2.2
    -rwxr-xr-x  1 root root  1061035  9月 11 17:54 License.htm
    -rwxr-xr-x  1 root root    43374  9月 11 17:54 License.txt
    -rwxr-xr-x  1 root root    58827  9月 11 17:54 ReleaseNotes.htm
    -rwxr-xr-x  1 root root     5715  9月 11 17:54 adminserver
    -rwxr-xr-x  1 root root      871  9月 11 17:54 adobe-lq.png
    -rwxr-xr-x  1 root root     2912  9月 11 17:54 ams_icon.png
    -rwxr-xr-x  1 root root  3220552  9月 11 17:54 amsadmin
    -rw-r--r--  1 root root        6  9月 11 17:54 amsadmin.pid
    -rwxr-xr-x  1 root root 11187664  9月 11 17:54 amscore
    -rwxr-xr-x  1 root root  4331472  9月 11 17:54 amsedge
    -rwxr-xr-x  1 root root  3070840  9月 11 17:54 amsmaster
    -rw-r--r--  1 root root        6  9月 11 17:54 amsmaster.pid
    -rwxr-xr-x  1 root root     5242  9月 11 17:54 amsmgr
    drwxrwxrwx  6 ams  ams      4096  9月 11 17:54 applications
    -rwxr-xr-x  1 root root      960  9月 11 17:54 cleanup
    drwxr-x---  3 ams  ams      4096  9月 11 17:54 conf
    drwxr-xr-x  5 ams  ams      4096  9月 11 17:54 creds
    drwxr-xr-x  3 root root     4096  9月 11 17:54 documentation
    -rwxr-xr-x  1 root root 16368842  9月 11 17:54 libadbe_dme.so
    -rwxr-xr-x  1 root root   336065  9月 11 17:54 libadbe_flv.so
    -rwxr-xr-x  1 root root    59248  9月 11 17:54 libasneu.so.1
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2.0.0
    -rwxr-xr-x  1 root root  1968482  9月 11 17:54 libcrypto.so.1.0.0
    -rwxr-xr-x  1 root root   162403  9月 11 17:54 libexpat.so.1
    -rwxr-xr-x  1 root root  3497472  9月 11 17:54 libfmsccme.so
    -rwxr-xr-x  1 root root  6992879  9月 11 17:54 libhds.so
    -rwxr-xr-x  1 root root   403767  9月 11 17:54 libssl.so.1.0.0
    drwxr-xr-x  2 root root     4096  9月 11 17:54 licenses
    drwxrwxrwx  2 root root     4096  9月 11 17:54 logs
    drwxr-xr-x  5 root root     4096  9月 11 17:54 modules
    drwxr-xr-x  6 root root     4096  9月 11 17:54 samples
    drwxr-xr-x  3 root root     4096  9月 11 17:54 scriptlib
    -rwxr-xr-x  1 root root     7494  9月 11 17:54 server
    -rwxr-xr-x  1 root root   300864  9月 11 17:54 shmrd
    -rwxr-xr-x  1 root root    36206  9月 11 17:54 tcSrvMsg
    drwxrwxrwx  2 root root     4096  9月 11 17:54 tmp
    drwxr-xr-x  9 root root     4096  9月 11 17:54 tools
    -rwxr-xr-x  1 root root     2411  9月 11 17:54 uninstallAMS
    drwxr-xr-x  8 ams  ams      4096  9月 11 17:54 webroot
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls

  • Compressor 4.1.3 hangs Waiting for Create Disc to Finish

    Compressor 4.1.3 hangs at the "Waiting for Create Disc to Finish" stage.  The audio and video streams have been created and are in Finder. The correct drive has been selected in the Actions section and there is a disk in the drive. I have run Compressor Repair.  However there is no activity at the drive (which otherwise works fine and will burn a disk from Finder).  Anyone any ideas?

    I'e not run into this before. Try a different clip – preferably a QuickTime movie. Bring that into Compressor and mark a short section with in and out points. Choose Hard Drive for Output Device in the Job Action section. What happens after you submit it?
    Russ

  • Waiting for another script to finish...

    I can no more start or stop FMS3 server, it says :
    Waiting for another script to finish...
    According to the start script, i check
    /home/fms/tmp/script.lck and i have this file as empty, what should
    i do then ?
    Do you all have this file ? /home/fms/tmp/script.lck ?
    Jerome

    My reply is late i just read your problem after having the same, it locked up my whole Ubuntu system.
    Its easy to solve just delete the lock folder you see. Server should restart and work fine.

  • Text Entry not waiting for entry before continuing

    Captivate 4
    I'm trying to add a TEB where the user will need to enter the correct text before moving to the next slide.  I would like it to continue as soon as they user types the correct entry.  The problem is that the slide doesn't pause to wait for the entry - it continues to the next slide without anything being typed or a click.  ??
    I have the correct text listed in the 'Correct Entries' box and have it set to 'go to next slide' for 'On success'.  Under 'Options', I have it set to 'Validate User Input'.  I do not have any hint or caption buttons, and I am not showing a 'submit' button.
    Can someone tell me how to get it to pause the training to wait for the user to enter the correct text?
    Screen shots below.
    Thanks in advance,
    D

    Hi there
    Indeed there is!
    You enable the Button in the properties. This will place an associated button next to the field.
    What's that you are asking? You don't want a button?
    Well, nobody said you actually have to SEE the button! Just double-click the button and its properties will show. Choose Transparent Button and configure it so it's invisible. Then you configure the other "1" for the Button press!
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • WaitFor() Does not wait for Process

    Experts,
    I have a Process p for a Microsoft Outlook Process OUTLOOK.EXE
    Now if there is an Email file (xyz.msg) opened as this process along with my MS Outlook running then,
    p.waitFor();
    // Where p = runner.exec(shell_command_to_open_msg_file);
    does not wait and move further.
    But if the MS Outlook is not running, then it waits till I manually close the Email msg file.
    How can I handle/overcome the former situation?
    Thanks in advance

    moondra_JavaDev wrote:
    How can I handle/overcome the former situation?
    You can't in java.
    What happens is that when outlook is already running then the new attempt to run does the following
    1. A application starts
    2. It determines that outlook is already running.
    3. It focuses that instance
    4. It exits.
    The last step is what you see. You do not have access to the one that is running because it isn't the same application.
    I would suggest examining the business requirements that are driving this. If you allow the user to already have outlook open then it seems rather odd that you are insisting that they exit it anyways. Instead you can pop a dialog and require that they tell you when they are done. Or don't use outlook and use java mail instead.

Maybe you are looking for

  • Limitation on Tree

    Does anybody know if there is limitation on number of nodes on Hierarchy tree? Potentially, my tree may have more than 4000 nodes all together.. Or is there another way to display tree? Thanks

  • How do I get the javabeans Introspector to ignore an interface?

    I've been struggling with this problem for the last couple days. I have the following code: public interface Prunable { public Object getId(); public boolean isPruned(); public void setPruned(boolean pruned); public class SomeEntity implements Prunab

  • HP Laserjet 1536dnf MFP Installation Error

    I have an HP Laserjet 1536dnf MFP printer which will not install.  I originally had Windows 7 OS and got the HP 1536dnf printer which installed fine.  However, I started getting the upgrade to Windows 8.1 pop-ups, which I avoided specifically.  Howev

  • How to clear a line of ImageIcons like in tetris?

    If I have a JPanel with different ImageIcons in it like tetris and if the line is filled it will be removed. Does anyone know how i can redraw the area occupied by the ImageIcons? should I redraw the entire panel "down " to overlap it? Thanks

  • Interactive reporting problem in CRM 5.2

    Hello Everybody, We have installed SAP CRM 5.2 and with the help of Web UI able to do all transactions like account management,lead,Opportunity management and creating sales order etc... but when i click on Reports ( as BI is integrated to CRM in SAP