Running something in the background?

Is there away to invoke a method call as background low priority w/o waiting for return?  sort of like a fork?   i'm needing to have a viewstack draw its second child in the background while the user interacts with the first child.  by the time the user is done with the first child, the second child should be ready to display.
i'm sort of wanting to apply video page flipping methodology to this.
thanks in advance!
yuliang

creationPolicy="all" will work if you have only two children and their content never change.
But if you have many more children or your children content change, you need to use what is called deffered instantiation.
In that case, you use creationPolicy="none" and you explicitly tell the viewstack children to create their component by a call to
container.createComponentsFromDescriptors(recurse:Boolean):Boolean

Similar Messages

  • Possible to run something in the background?

    This is my situation: I have a Student class and a Clazz class. A student can belong to only 1 clazz and a clazz can have many students. These 2 classes are mapped to 2 database tables. In the following code, I remove all the JPA annotations.
    class Student {
        private Clazz clazz;
        public void setClazz(Clazz clazz) {
            this.clazz = clazz;
            clazz.getStudents().add(this);
    class Clazz {
        private List<Student> students;
    }So to add a new student to an existing class, I do something like:
    Student student = new Student();
    Clazz clazz = entityManager.find(Clazz.class, clazzId);
    student.setClazz(clazz);
    entityManager.persist(student);Because of the line clazz.getStudents().add(this); in the Student.setClazz method, the application has to go to the DB and load all the existing students for that clazz (which takes a long time).
    The Student and Clazz codes are very difficult for me to change (somebody wrote them and they don't wanna change). So I have to think of some way to load the clazz and all its student when I have the clazzId information. The duration from when I have the clazzId info until the student is saved to the db is about 1min.
    This is what I did:
    - I created a stateful session bean with an EXTENDED entity manager which has a method to return a clazz when we feed it a clazzId. So the returned clazz is persisted.
    - I created a stateless session bean which has a timer. When I have the clazzId, I start the timer, give the timer a ClazzHolder instance.
    class ClazzHolder {
        private Long clazzId;
        private Clazz clazz;
        private boolean done;
    }- The timer gets the clazzId from the ClazzHolder instance, feeds that clazzId to the stateful bean, receives a persisted Clazz instance back, saves that Clazz instance in the ClazzHolder instance and turns the flag "done" to true.
    It seems to me that the ClazzHolder instance the stateless session bean has is not the ClazzHolder instance that I pass to it (but the content is the same). I think it's because the ClazzHolder instance I pass to the session bean is serialized first, and then de-serialized to build an object and give to a method in the session bean.
    Summary: my idea of using timer to load something before hand doesn't work.
    My question is: is there any way to load something from the database and keep it persisted before hand?

    Hi Naimesh,
    thx for explanation. I am not sure, if I understood everything in the right way.
    Where do you write the code for building the selection-screen? (PARAMETERS, SELECT-OPTIONS etc.)
    If you write these commands in a class method, you will get a syntax error ( because it's forbidden per definition of ABAP objects). So, am I right assuming that you put the coding just at the beginning of the ABAP report ? And after START-OF-SELECTION-event you start the processing... ?
    Furthermore, I don't really understand why you create an separate class for ALV. I found your "SAP abap help"-blog, where you explained the concept of MVC ((By the way, well done!), but you didn't mention an "ALV class" there..
    Mh.. another question - have you ever combined MVC with object services?
    At the moment I'm working on a software project where I use object services. I created 2 persistent classes via SE24 and one local class in my ABAP Report.
    I don't really see possibility to implement MVC in this project without change very much of coding and class structure...
    In my opinion the M (data&business logic) are my existing global classes and my local class is kind of Controller class?!
    Thx in advance,
    Anne

  • Running AppleScript in the background

    Okay, yet another problem I'm having that I'm going to bug the community here with.
    Is it at all possible to run AppleScript while doing other things? For example, if I wanted my AppleScript to hop online every hour and send me back information from my site could I have it do this while I do other things? Or will I have to wait until it's completed?
    Say I wanted to create a script that hopped on my site and sent me the post number of the last post, could I have it do this while I do other things?
    Something like
    tell application "Safari" to activate
    tell application "System events"
    tell process "Safari"
    (enter code here to get post number and send it to me)
    end tell
    end tell
    I've tried doing it like this and it definitely doesn't work at all if I don't have the Safari window selected at all times, so is there any way in which I can run script in the background while I work on other things or does AppleScript require full control of my computer while it's working?

    Save this script just like the others I posted. The script will do exactly as you asked.
    <pre style="width:630px;height:auto;overflow-x:auto;overflow-y:hidden;"
    title="Copy this code and paste it into your Script Editor application.">property helloWorld : "Hello World "
    global numChars, charNum, x
    on run
    tell application "System Events" to set isRunning to exists process "TextEdit"
    if not isRunning then tell application "TextEdit" to launch
    tell application "TextEdit"
    if isRunning then make new document
    set name of window 1 to "Hello World"
    set numChars to number of characters in helloWorld
    set charNum to 0
    set x to 0
    end tell
    end run
    on idle
    try
    tell application "TextEdit"
    if x = numChars then
    set x to 1
    else
    set x to x + 1
    end if
    set charNum to charNum + 1
    set theChar to character x of helloWorld
    set character charNum of document 1 to theChar
    end tell
    on error
    quit
    end try
    return 0.1
    end idle
    on quit
    continue quit
    end quit</pre>

  • How to run form in the background from command line

    please can anybody tell me to
    how to run form in the background from command line
    vishal

    Ummm....Oracle Forms is a foreground runtime kind of thing. What you want is a database procedure (or an OS utility - it depends on what sort of processing you want to do in the background).
    Cheers, APC

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • Running program in the background

    Hi everybody!
    I need to run  program in the background.
    So I need only to change the sy-batch status to 'X'?

    HI,
    if your program is runninn in the Background then the System field SY-BATCH will become 'X' otherwise it will have space ......
    it will not execute the job in the background if you put SY-BATCH = 'X'
    you need to use: Job_open , Job_submit and job_close function modules
    example:
    *Submit report as job(i.e. in background) 
    data: jobname like tbtcjob-jobname value
                                 ' TRANSFER TRANSLATION'.
    data: jobcount like tbtcjob-jobcount,
          host like msxxlist-host.
    data: begin of starttime.
            include structure tbtcstrt.
    data: end of starttime.
    data: starttimeimmediate like btch0000-char1.
    Job open
      call function 'JOB_OPEN'
           exporting
                delanfrep        = ' '
                jobgroup         = ' '
                jobname          = jobname
                sdlstrtdt        = sy-datum
                sdlstrttm        = sy-uzeit
           importing
                jobcount         = jobcount
           exceptions
                cant_create_job  = 01
                invalid_job_data = 02
                jobname_missing  = 03.
      if sy-subrc ne 0.
                                           "error processing
      endif.
    Insert process into job
    SUBMIT zreport and return
                    with p_param1 = 'value'
                    with p_param2 = 'value'
                    user sy-uname
                    via job jobname
                    number jobcount.
      if sy-subrc > 0.
                                           "error processing
      endif.
    Close job
      starttime-sdlstrtdt = sy-datum + 1.
      starttime-sdlstrttm = '220000'.
      call function 'JOB_CLOSE'
           exporting
                event_id             = starttime-eventid
                event_param          = starttime-eventparm
                event_periodic       = starttime-periodic
                jobcount             = jobcount
                jobname              = jobname
                laststrtdt           = starttime-laststrtdt
                laststrttm           = starttime-laststrttm
                prddays              = 1
                prdhours             = 0
                prdmins              = 0
                prdmonths            = 0
                prdweeks             = 0
                sdlstrtdt            = starttime-sdlstrtdt
                sdlstrttm            = starttime-sdlstrttm
                strtimmed            = starttimeimmediate
                targetsystem         = host
           exceptions
                cant_start_immediate = 01
                invalid_startdate    = 02
                jobname_missing      = 03
                job_close_failed     = 04
                job_nosteps          = 05
                job_notex            = 06
                lock_failed          = 07
                others               = 99.
      if sy-subrc eq 0.
                                           "error processing
      endif.
    Thanks
    Sudheer

  • How to run long running report in the background

    Oracle Application server 10g
    I need to run the long running reports in the background because while the report is running the cursor is loading and the control doesn't return to the user
    this feature exist in oracle 6i by set the following parameter
    RUN_PRODUCT( REPORTS, 'r_1', ASYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    How can I accomplish the same in OAS 10g?

    Hi,
    I've done this in 11g. I think it will be the same in 10g as well
    Following are the steps in 11g using run_report_object.
    1. Read metalink note: Using the Reports Server Queue PL/SQL Table and API - RW_SERVER_JOB_QUEUE [ID 72531.1]
    2. Implement RW_SERVER_JOB_QUEUE table as per above notes.
    3. When submitting report run it as background
    a. SET_REPORT_OBJECT_PROPERTY(lo_report_object, REPORT_EXECUTION_MODE, ASYNCHRONOUS); -
    SET_REPORT_OBJECT_PROPERTY(lo_report_object, REPORT_COMM_MODE , BATCH);
    4. Display the job_id to user (notification).
    5. Create a new form to view reports base on on RW_SERVER_JOB_QUEUE which provides you the status, etc.... (you may have to create a way to identify the username who submitted the job. This way not all users will see the jobs in RW_SERVER_JOB_QUEUE )
    6. Optionally you can use NOTIFYSUCCESS=email to notify user when the report is finished.
    Cheers
    LS

  • I have a Mac mini. Suddenly there are ads running constantly in the background. Even when it's just on desktop. Anybody experience this?

    I have a Mac mini. Suddenly there are ads running constantly in the background. Even when it's just on desktop. Anybody experience this?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Drag the image file into the editing window to upload it. You can also include text in the reply.

  • Run Servlet in the background (Daemon)

    Hi all ,
    I am using Apache Tomcat/5.0.25 container.
    Need some advice regarding running servlet at the background or as daemon . Below is the scope of the program :
    The servlet will do a updating in the database in the background every 5 minute.
    Any ideas how to implement such behaviour using servlet ?
    Thanks.
    Wee Tat

    hi..
    Make a thread and initialize in the init method of ur servlet.
    And make another thread so that it wakes up every five minutes and does the database processing..
    so ur servlet always has a thread which invokes the other thread(database accesing thread)..
    here is the code sample ..
    Thread t = new Thread( new Runnable() {
    public void run() {
    Thread dbHandler = new DBHAndler(..);
    dbHandler .start();
    try {
    t.start();
    catch(IllegalThreadStateException e) { }
    hopefully it works..
    regards
    Kovi

  • Run OC4J in the background

    Is there anyway I can run OC4J in the background as an NT service?
    Thanks in advance.

    I took the approach above, and my experience was only partially successful. With some scrounging around newsgroups, orionsupport.com, and Sun's website, I came up with the following solution:
    Creating an NT Service for OC4J
    OC4J by default runs as a command shell application, so it is bound to a user's login session and will die if the user who called the start command logs off of the system. Oracle has not provided a version of OC4J that runs as a service on Windows-based servers, so here is a process to create a service using the freeware utility, RunExeSvc (http://www.winwinsoft.com/goodies/RunExeSvc/index.html). This utility is more user-friendly and flexible than tools such as srvany.exe and instsrv.exe in the NT Resource Kit.
    Dependencies
    1. RunExeSvc is installed
    (Unzip the runexesvc.zip file to a directory)
    2. Sun's JDK 1.3.1 is installed.
    (JDK 1.3.1 is required because a bug in prior versions of Sun's JVM for Windows killed any JVMs initiated by a user in that login session.)
    Installation Procedure
    1. Run the RunExeSvcAdmin.exe application
    2. Create a new service by copying the example script below into the Script window of RunExeSvcAdmin.exe. Some changes to drives and/or paths may of course be needed.
    3. Save the new entry and exit the application.
    4. The service should now appear in the services control panel. Changes may be required for its startup options.
    Example Script#########################
    # This script runs OC4J
    # RunExeSvc variables
    # if true, RunExeSvc will show internal status
    debug=false
    # the starting dir of the service
    home=e:\oc4j\j2ee\home
    # Running as an http server.
    cmdline=e:\jdk1.3.1\bin\javaw.exe -Xrs -jar orion.jar -out e:\oc4j_out.log -err e:\oc4j_err.log
    null

  • How run OC4J in the background

    Hello!
    How can I run oc4j in the background(without a window open) on a solaris box?
    I have tried 'nohup java -jar oc4j.jar &' but the startup seems to hang when I do this.
    Any ideas?

    Make sure you can write to nohup.out in the current directory.
    Also, I typically start my OC4J in /etc/init.d from my solaris machine and that seems to work nicely.
    Also try putting the 2>&1 at the end instead of in the middle.
    Of you could try using CSH vs. SH, some google hits mention that makes life easier.
    Rob

  • I am trying to remove something from the background of my image how is this done.

    i am trying to remove something from the background of my image how is this done.

    jboll0820 wrote:
    how is this done.
    Generally, using a different program than Lightroom, e.g. Photoshop.
    Note: you can remove objects in Lightroom by stringing dust-spot removal bubbles across them, but that may or may not be preferrable. If you do go that route, it may be essential to position strategically *after* initial placement.

  • Had an avg problem (still unresolved) now firefox does not come up at all but something in the background is working once I clicked on it - windows XP

    I had/have avg toubble and now firefox will not start. I uploaded a new version but made no difference. If I click on it the time symbol comes up for a few seconds and than nothing. When I restart the computer though a small window comes up alerting me not to end the programm till it scaned it. So I figure after clicking on it something must be running in the background. But no symbol comes up on the dectop or in the application manager.
    Any ideas?
    Regards Franz

    I had/have avg toubble and now firefox will not start. I uploaded a new version but made no difference. If I click on it the time symbol comes up for a few seconds and than nothing. When I restart the computer though a small window comes up alerting me not to end the programm till it scaned it. So I figure after clicking on it something must be running in the background. But no symbol comes up on the dectop or in the application manager.
    Any ideas?
    Regards Franz

  • Running Skype in the background on iPhone 3Gs

    I was under the impression that the 3Gs could run more than one application at one time. I am trying to figure out how to start Skype and just leave it running as long as I am online (wifi, of course, I understand that Skype won't work over 3G). I want to be able to answer calls via Skype and not have to leave my iphone on Skype all the time.
    Anyone know how to do this?
    (I was really, really disappointed to learn that the iPhone/ATT deal doesn't include an app that allows me to automatically switch from 3G calls to WiFi when I get into WiFi range. My Blackberry did this without as much as a thought...totally automatic... Anytime I was near a WiFi network, anyone who called my cell phone number would be connected to me via VOIP. I'm really bummed the iPhone doesn't do this. )

    What I'm trying to accomplish is to have an app which will accept VOIP calls open and running at all times so that I don't use cell phone minutes while I'm on WiFi. That was the joy of the Blackberry (also ATT): Whenever I was on Wifi, anyone who phoned my normal cell phone number was automatically routed through Wifi and connected to my blackberry, just like a normal cell voice call...but it was using VOIP and I didn't have to use my cell minutes. I was completely dumfounded to learn that this wasn't standard operating procedure for the iPhone. So I figured, OK, the next best thing would be to have the iPhone have Skype running in the background so folks could at LEAST contact me that way without it using my cell minutes.
    So far, not so impressed with way ATT and Apple have this arrangement going. I hope I can find some Apps for the iPhone that impress me perhaps that will help redeam the (pretty lacking) VOIP integration that I've seen so far.
    But I totally admit: I'm new at the iphone (Apple user since 84) and I may yet become convinced that this is a decent product.... Week 1 with the 3Gs, pretty disappointing.

  • Running xscreensaver in the background after resume from hibernate

    I'm using hibernate-script with my tuxonice kernel. One of the things that annoys me about xscreensaver is how when I resume its always running (because the requisite time has passed), so I have to type my password again, having just typed it at BIOS level.
    So I killall xscreensaver in an OnSuspend in /etc/hibernate/common.conf. However, restarting xscreensaver doesn't go to the background. What I'm using is this:-
    OnResume 20 sudo -b -u MYUSERNAME /usr/bin/xscreensaver
    However the terminal that I typed sudo hibernate from never returns, I have to killall xscreensaver from another terminal to get it to release. The problem does not occur when I login to a vt as root and run the same command.
    Any suggestions?

    I just registered for the forum so I could toss in my solution, so I hope this is what you're looking for. I fork the process and use the 'disown' command. I also use Dan Bernstein's 'setuidgid' utility because I couldn't get it to work with su (I didn't try very hard):
    OnResume 70 setuidgid USERNAME xscreensaver > /dev/null 2>&1 & disown
    This works for me even if I execute hibernate and resume from a terminal, despite the fact that II get a "can't find display" error from the terminal.
    Of course, the stdout and stderr redirect to /dev/null is not necessary. The 'disown' command removes the subprocess from the process table, so that the subprocess is no longer a child of the parent. It is cast off, essentially. I also use a similar command for restarting gkrellm because gkrellm sometimes fails to recognize my second battery after resume.
    One quirk I have found is that hibernate will halt if a kill or killall fails. I thought this was happening because the kill command had returned a non-zero exit status. But I just discovered that forking a kill command prevents hibernate from halting when a kill fails, as in:
    OnSuspend 20 killall xscreensaver > /dev/null 2>&1 &

Maybe you are looking for

  • Converting from a Business View connection to a non-Business View Error

    I have CR 2008 report with SP1. The report has a sub report. The main report is based off of a BV but the sub report is using an ODBC connection. When I try to update the ODBC connection I recieve an error message telling me that: Quote: "Converting

  • Settings for Automatic PO conversion

    Dear Gurus..., We are using Mfg Plant and Depo. Now we are doing generally the stock transfer of item from one plant to another plant manually. (Creation of PR and PO) I want to create automatic  PO  through MRP Run in recieving plant (DEPO) for the

  • Can an announcement link to a blog

    Hello, can anybody answer this for me please? I have a news announcement panel on the home page, I would like one of the announcements to link to a blog. I thought it would be  a case of editing the url and adding  the blog address BlogRetrieve.aspx?

  • SNMP v3 user name

    I'm trying to ping the airport extreme to get the amount of bytes transferred via SNMP. I can do it fine with SNMPv2: snmpget -v 2c -On -c public 10.0.1.1 IF-MIB::ifInOctets.6 But I'd like to get the 64 bit counters that are only available in SNMPv3.

  • Email and Verizon Portal login credentials..

    Hi there! I've got a bit of an odd problem. I switched from DSL to FiOS For Business in 2007, and my email accounts transfered over with it, just like clockwork. Earlier this year I switched the plan back to residential as I didn't need a static IP a