Time consuming task execution

Need help.
The task for servlet is:
1. Get client's parameters
2. Run very time consuming task (db copying)
3. Return to client immediately after the task has started
The question is: what is the standard way for resolving 2,3?
Forward thanks.

I had this before...I setup a separate application to do the time consuming task as a Thread with a ServerSocket on a random port on the machine.
Then, in the Servlet, I opened a Socket to this port and wrote the command to start. The Servlet will return instantly, and then Thread application will kick off.
Your Thread application may need to be capable of spawing multiple worker Threads if your DB copy can happen all the time, else you will need to have your Servlet check the status of the Thread. If busy, return to the user that the copy is still happening.

Similar Messages

  • Using ProgressMonitor for unknown time-consuming task

    Hi,
    I have a time-conuming task that I don't know how long will it take, and I want to use ProgressMonitor.
    I tried to set the maximum to 100 like this:
    monitor = new ProgressMonitor(null, "", "", 0, 100);
    and then, after the task is finished - to do the following command:
    monitor.setProgress(100);
    but the progress monitor is never shown.
    what is the problem?
    thanks

    Per the API:
    A class to monitor the progress of some operation. If it looks like the operation will take a while, a progress dialog will be popped up. When the ProgressMonitor is created it is given a numeric range and a descriptive string. As the operation progresses, call the setProgress method to indicate how far along the [min,max] range the operation is. Initially, there is no ProgressDialog. After the first millisToDecideToPopup milliseconds (default 500) the progress monitor will predict how long the operation will take. If it is longer than millisToPopup (default 2000, 2 seconds) a ProgressDialog will be popped up.
    Do you call setProgress at any point?

  • Scheduling framework for time consuming tasks ?

    Hello,
    I was wondering what frameworks exist today to handle "time operations".
    I have a job that will take ~20h to run (populating database list, based on conditions).
    I need something that could handle that generation of this list for me, there are some cases to consider like what happens when we crash? What if more then 1 task was submitted to run? and co.
    Generally speaking I'm looking for something like quartz, that could also implemented error handling.
    Recommendations are welcome :)
    Thank you,
    Maxim.

    What's wrong with Quartz? why not just use it? If it doesn't do what you need, I believe it is open source.
    http://www.opensymphony.com/quartz/

  • Help with time consuming task

    Hi,
    I sent the same post to "New To Java", but i guess that it was the wrong place:
    I wrote a little program which copy a portion of File_1 to File_2, basically I tell it the start and end positions and the program extract the specified section from File_1 and copy it to File_2, so far so good, (the code):
    BufferedReader inFile = new BufferedReader(new FileReader(path1));
    BufferedWriter outFile = new BufferedWriter(new FileWriter (path2));
    outputSize = endPos - StartPos;
    inFile.skip(startPos);
    for (int i = 0; i < outputSize; i++){
         outFile.write(inFile.read());
    }The problems starts when the start position is at the end of File_1, for example, lets say File_1 = 300MB and i try to cut 5% to 15% (output of 10% - 30MB), the whole process takes about 3 seconds. But, if i try to cut 85% to 95% (the same output size) it can take me as long as 40 seconds.
    I'm sure its the skip() method but i don't know if I can do this task in a different way?.
    Thanks in advance.

    That was our first problem, because the logs are so big, some files get to 1 - 1.5 GB and the cuts we need are for very specific time windows, we first do a search in the file for our start time and end time (I found out that the total commander viewer is the fastest for this task) and once we have these positions we head to my program for cutting.

  • Making task execution a reality, in real-time, for critical industries

    Problem
    Enterprise software systems like ERP identify what needs to be done, but fail to outline how these tasks should be executed, due in large part to operational processes which are typically locked in disparate procedural documents, forms and excel spreadsheets. This approach limits the visibility into internal operations, enhancement of management by exception, and predictive analytics.
    In all of industries Mobideo targets, processes are managed traditionally with ERP software  where the tasks performed are manually documented, a process which is error prone and time consuming. In the Aerospace and Defense industry  for example, the Federal Aviation Administration concluded that documentation is the leading contributing factor to maintenance mishaps. These errors are specifically attributed to:
    Failure to follow published technical data or local instructions
    Using an unauthorized procedure not referenced in the technical data
    Supervisory personnel accepting non-use of technical data or failure to follow maintenance instructions.
    Solution
    Mobideo’s unique solution gathers granular data to capture what is happening in an operational environment in real-time, thereby optimizing performance, cost, and compliance of operational processes. It does this by uploading the smallest of business elements in the formats they are found and converting them to a mobile application. Using SAP HANA, the platform enables visibility by creating personalized applications that guide users through each job task in a step-by-step checklist. This framework ensures quality in tough working environments and confirms execution of tasks at the point of service. Core Competencies
    Mobideo converges all task execution data into a unified application
    Mobideo ensures compliance
    Mobideo tracks granular interaction and data entry in real time
    Mobideo enables rapid deployment driven from the procedures themselves
    Mobideo offers Deep integration with third party enterprise applications
    Watch
    Watch Samuel Solomon, chairman discuss the Mobideo solution at this year’s SAPPHIRE NOW event.
    SAP HANA Transforms Operations Management for Mobidio - YouTube

    Problem
    Enterprise software systems like ERP identify what needs to be done, but fail to outline how these tasks should be executed, due in large part to operational processes which are typically locked in disparate procedural documents, forms and excel spreadsheets. This approach limits the visibility into internal operations, enhancement of management by exception, and predictive analytics.
    In all of industries Mobideo targets, processes are managed traditionally with ERP software  where the tasks performed are manually documented, a process which is error prone and time consuming. In the Aerospace and Defense industry  for example, the Federal Aviation Administration concluded that documentation is the leading contributing factor to maintenance mishaps. These errors are specifically attributed to:
    Failure to follow published technical data or local instructions
    Using an unauthorized procedure not referenced in the technical data
    Supervisory personnel accepting non-use of technical data or failure to follow maintenance instructions.
    Solution
    Mobideo’s unique solution gathers granular data to capture what is happening in an operational environment in real-time, thereby optimizing performance, cost, and compliance of operational processes. It does this by uploading the smallest of business elements in the formats they are found and converting them to a mobile application. Using SAP HANA, the platform enables visibility by creating personalized applications that guide users through each job task in a step-by-step checklist. This framework ensures quality in tough working environments and confirms execution of tasks at the point of service. Core Competencies
    Mobideo converges all task execution data into a unified application
    Mobideo ensures compliance
    Mobideo tracks granular interaction and data entry in real time
    Mobideo enables rapid deployment driven from the procedures themselves
    Mobideo offers Deep integration with third party enterprise applications
    Watch
    Watch Samuel Solomon, chairman discuss the Mobideo solution at this year’s SAPPHIRE NOW event.
    SAP HANA Transforms Operations Management for Mobidio - YouTube

  • Since recent updates, I have noticed that my apps close automatically when I am distracted. In some cases it is time consuming to sign back in and get back to the task I was doing. Is it possible to change a setting so the apps will stay open?

    Since recent updates of iOS, I have noticed when using my iPad that my apps close automatically when I have to leave the room or am otherwise distracted for a few minutes. It is sometimes time consuming to sign back in and get back to the task where i left off. Is there a setting I can change so it will keep the apps open until I am ready to close them? Thanks for your help.

    Did you have this problem before Restoring you iPad?
    If you did then did you restore with a backup. You may have reinstalled something that is conflicting in this back up
    If not then sounds like either something went array with the clean install or a hardware issue.
    I know it's long winded but have you tired a clean install then downloading the apps again?
    PJRS

  • How can i have a multi task approach while working on my iPad? Shfting windows is heavy and time consuming!

    How can i have a multi task approach while working on my iPad? Shfting windows is heavy and time consuming!
    Also shifting windows while surfing is not easy, when used to multiple screens and easy shifting from one web page to another.
    Thks

    Not entirely sure what you mean, but this has some info about multi-tasking . iOS 5, which will be available to download on October 12th, adds multi-tasking gestures (from http://www.apple.com/ios/features.html#more) :
    Using four or five fingers, swipe up to reveal the multitasking bar, pinch to return to the Home screen, and swipe left or right to switch between apps.
    Also Safari will get tabbed browsing in iOS 5, making it easier to switch between pages/tabs.

  • BCS Task execution tracking

    Hello experts,
    I have a question regarding tracking task execution in BI-BCS.
    My client has a large structure of more than 100 companies. They all use BCS solution on BI7 to load data, perform reclassifications, validations, balance carry forward, sign-offs, etc... during each reporting cycle.
    As time during reporting cycles is crucial, the Group reporting team would like know the progress - they would like to track how many companies executed each task:
    - how many loaded data,
    - how many run reclasses, etc...
    Does BCS have any mechanism to provide these statictics? If not, maybe it's possible to build report (either BEx or ABAP program), but where the tasks statuses are stored? Any idea what's the table name where status of each item from task hierarchy is stored?
    Kind regards,
    Roman

    Hi Eugene,
    Many thanks for your reply!
    Yes, every company enters its own data, runs tasks through Consolidation monitor. And the status of each task is displayed for this particular company.
    However, as a Group controller, I would like to see the summarized progress report from all companies. Example - let's assume we have 108 companies in total. The report should show number of companies that executed each task:
    Tasks:   |   Company count
    |----
    Task 1   |   90
    Task 2   |   40
    Task 3   |   39
    or precentages (eg. 80% of companies executed task 1, 35% executed task 2...)
    or another way - BEx report with drilldown by company code per each task:
    Tasks:   |   Company
    |----
    Task 1   |   3001
                 |   3003
                 |   3014
                 |   3015
                 |   3020
    Task 1   |   3001
                 |   3014
                 |   3015
    Task 3   |   3001
    or anything else that would summarize where are we in terms of data preparation in current reporting cycle.
    Any ideas?

  • Time Consuming SQL Statements

    Hi All
    I am working on Performance Tuning on Oracle 10g/ Solaris environment.
    I am looking for a shell script that gives top 10 Time Consuming SQL Statements...... My client does not want me to use statspack or OEM for somereasons which i dont know.
    I am wondering if any of you might help me out ....
    Please post your script here ...........
    thanks in advance
    riah

    Hi,
    might be the script from Steve Adams site gives you some ideas
    -- Script:     expensive_sql.sql
    -- Purpose:     to find expensive sql that may need tuning
    -- Copyright:     (c) 2000 Ixora Pty Ltd
    -- Author:     Steve Adams
    @save_sqlplus_settings
    prompt This script shows SQL statement that account for more than
    prompt a certain percentage of disk reads.
    prompt
    @accept Percent "Threshold percentage of disk reads" 2.5
    column executes format 9999999
    break on load on executes
    select
    substr(
    to_char(
    100 * s.disk_reads / t.total_disk_reads,
    '99.00'
    2
    ) ||
    '%' load,
    s.executions executes,
    p.sql_text
    from
    ( select sum(disk_reads) total_disk_reads from sys.v_$sql ) t,
    sys.v_$sql s,
    sys.v_$sqltext p
    where
    (100 * s.disk_reads / t.total_disk_reads > &Percent)
    and s.disk_reads > 50 * s.executions and
    p.address = s.address
    order by
    1, s.address, p.piece
    undefine Percent
    @restore_sqlplus_settings
    Hope this helps,
    Andrey

  • Task executions in multi server environment

    Hi All,
    I have a question regarding the task execution in a multi-server environment.
    Below is the scenario:
    We have two SIM applications: one for intranet users (employees and contractors) and one for extranet users (customers). Both these applications point to same database repository.
    Intranet : idm-intra.ear ( this is deployed on IntraServer1 and IntraServer2)
    Extranet: idm-extra.ear ( this is deployed on ExtraServer1 and ExtraServer2)
    And both share same repository WAVESET.
    Now we are deploying some request workflows for intranet users. In our case even the extranet application can see these tasks.
    My question is: if I triggered a request workflow from intranet application and it is pending for approval and when it times out, is there a chance that this workflow is executed by the "extranet" application?
    Thanks,
    kIDMan.

    The answer to your question is yes. If you go to the Configure>>Server tab in the admin console on any of these instances of IdM you should see all four instances. An easy way to test this is happening, is to enable workflow tracing and launch a couple of request from IntraServer1. IdM will try to distribute the work among all the servers it knows about so you'll see portions of the flow within the workflow traces on the individual servers. Well maybe it's not an easy thing to test because it's a timing issue.......
    I had an issue recently in which the guy doing the build to the QA environment messed up and pointed the QA IdM instances to the DEV repository. We were doing some testing of some flows on DEV and they were being executed on the QA IdM instances and bombing out with ClassNotFound errors because the QA environment was not build out completely/correctly. So even though the requests were being launched from the DEV instances they were being executed on the QA instances.
    There is a feature that is supposed to let you restrict which workflows run on which servers. If you go to the admin console and click on Configure>>Servers choose a server and click on the 'Scheduler' tab and then check the 'Task Restrictions' checkbox. From here you can restrict which workflows run on which servers. But my suspicion is that this doesn't work correctly (based on some testing I was doing on 7.1)....might want to test it out....Hope this helps.

  • IAPI Task Execution Class

    Hi,
    I am trying to figure how the IAPI Task Execution works when you schedule a job of this task type.
    While creating a schedule task of this task type you need to specify the IapiTaskIfc Class which looks like a custom class. How exactly do we go about creating this class and in a current application where can I find the source code for this class?
    Thank You,
    Patricia

    Hi Patricia -
    IAPI Scheduled Tasks are customized Java classes (deployed via a custom JAR file with E-Sourcing) that can execute on a schedule or one-time. In some cases, SAP customizations such as the contract attachment loader are developed using this technique. In fact, use of the IAPI scheduled tasks can often times be a convenient way to integrate custom code for either one-time or ongoing integration or data upload tasks.
    Developing IAPI scheduled tasks is not something that can be done easily since E-Sourcing does not come with a built in development environment as other SAP applications do. In fact, I don't believe there is any way to develop and IAPI scheduled task if you are using a hosted version of E-Sourcing since there is no way for you to create the Java classes and compile them against the E-Sourcing classes, which is required since an IAPI scheduled task must implement a Java interface (IapiTaskIfc) that is shipped with E-Sourcing.
    If you are using E-Sourcing on-premise it may be possible to develop, compile, and deploy a custom JAR file that implements the interface and can be configured in the IAPI scheduled task area. That being said, I don't believe that any instructions for doing so are provided with E-Sourcing.
    If you have a specific problem you are trying to address, there might be alternatives using E-Sourcing Script Definitions which are much easier to build and integrate. If you believe you require use of the IAPI scheduled task capability, I would advise working with SAP to have the scheduled task built for you.
    I hope this information is helpful.
    Regards,
    Rob

  • VB Macro in Bex Analyser is taking long time to complete execution

    Hi Experts,
    In a FI query , we have a VB macro which update the excel sheets by taking values from the previous excel sheets .
    The issue is its taking long time for query execution and if we are keep on pressing 'ENTER' button . The query is running very fastly and is giving the results ,but its not a correct way to do.
    Its a critical issue in Production and can anyone help me to resolve the issue.
    Regards,
    Anju

    Hi Anju,
    I need to create a VB macro in one of my query but i not familiar how i can plug the VB code into the query.
    Please can you give me some basic procedure on how to do that?
    What i need to do exactly is to bring a KF from a query into another query. Not sure if this is possible using VB.
    Let me know.
    Thanks.
    Cesar

  • I have a solution (albiet time consuming) to iTunes match step 3 crashing

    So I've been a iTunes Match subscriber for about 6 months. At first it took me a few goes of it to get it down to about only 350 songs needing to be uploaded in Step 3.... Then the REAL frustration began.... From that point forward no matter what I tried I could NEVER get past Step 3. As soon as Step 2 finished and step 3 began, iTunes would crash. So for the past 5 months I have been unable to get those 350 songs uploaded. It wouldn't even do just one then crash. I was frustrated but after looking I could do without having access too those 350 songs at all times. But then there WAS a song that I HAD to have access too and the frustration began again. I tried EVERYTHING I could find on the internet. Uninstalling and reinstalling iTunes, turning Match off then on, deleting errored files (I only had 4). Playing with router settings, everything. I noticed a lot of people wondering about having music on external hard drives even which mine is. (I will say from experience if your using a USB hub to connect your external hard drives, try connecting them directly into your computers USB port to speed things up a bit).  Then I started reading about people having success converting one troublesome song or two to ACC, deleting the old version, then "manually" right clicking on them and clicking "add to iCloud" My issue was that this option was NEVER available to me when I right clicked the songs in iTunes! Plus some of the 350 songs were already in ACC format. Tonight, after playing around I've found a round about way (and time consuming if your doing this for 350 songs like me, feel bad to those who have THOUSANDS) to finally get these songs to upload to iTunes Match. Here is what I did, and I REALLY hope this can help someone else.
    #1. When you first open iTunes, you notice in the top/middle info window that iTunes attempts to connect to the iTunes store, AND iTunes match tries to do its thing as well. AS SOON AS YOU OPEN ITUNES, click the small little X next to the progress indicator inside that info window until ALL acivities have stopped.
    #2. Make sure you have the "iCloud Status" sort turned on
    #3. Sort your song list in iTunes by the iCloud Status Look down the list until you get to where all of your "waiting" songs are at
    #4. Select a small managable group (10 worked best for me, more than that would sometimes cause errors and I would have to redo them)
    #5. Right click on the selected group and then select "convert to ACC"
    #6 DO NOT CLICK ON ANYTHING ELSE AFTER 'convert to ACC"
    #7 Once this completes you will hear the normal "ding" that iTunes is finished
    #8. The original files will still be selected with the new ACC versions below each one, not selected. Hit your delete key.(You only want to keep the newly converted ACC files) Also, EVEN IF A FILE WAS PREVIOUSLY ACC, STILL SELECT IT FOR THIS CONVERT TO ACC PROCESS!!!!! If itunes asks if you want to delete these and move to the recycle bin, do so, as you now have another copy that seems to play well with iTunes.
    #9 Now you have the 10 recently converted to ACC songs... Select those ten, right click on them then the "Add to iCloud" option (which for me was the first time I had ever gotten to see it at all)
    #10 iTunes Match should now begin the process of trying to match JUST THOSE SELECTED songs, then upload whatever is needed. Using this system, I HAVE YET to run across iTunes or iTunes match, hanging up, or crashing all together.
    I know this is a bit time consuming, and you COULD do this just for the songs you REALLY wanted to make sure were in the Cloud if you wish. My thought was if I'm going to do it, I might as well do them all.
    I REALLY hope this will help someone as I have read so many forum posts, websites, ect, with people just as frustrated as me. And it even made it more frustrating as I had seen new "solutions" posted online yet said solutions still wouldn't work for me.  If you have any questions, please feel free to comment and I'll try to answer and help!

    So I've been a iTunes Match subscriber for about 6 months. At first it took me a few goes of it to get it down to about only 350 songs needing to be uploaded in Step 3.... Then the REAL frustration began.... From that point forward no matter what I tried I could NEVER get past Step 3. As soon as Step 2 finished and step 3 began, iTunes would crash. So for the past 5 months I have been unable to get those 350 songs uploaded. It wouldn't even do just one then crash. I was frustrated but after looking I could do without having access too those 350 songs at all times. But then there WAS a song that I HAD to have access too and the frustration began again. I tried EVERYTHING I could find on the internet. Uninstalling and reinstalling iTunes, turning Match off then on, deleting errored files (I only had 4). Playing with router settings, everything. I noticed a lot of people wondering about having music on external hard drives even which mine is. (I will say from experience if your using a USB hub to connect your external hard drives, try connecting them directly into your computers USB port to speed things up a bit).  Then I started reading about people having success converting one troublesome song or two to ACC, deleting the old version, then "manually" right clicking on them and clicking "add to iCloud" My issue was that this option was NEVER available to me when I right clicked the songs in iTunes! Plus some of the 350 songs were already in ACC format. Tonight, after playing around I've found a round about way (and time consuming if your doing this for 350 songs like me, feel bad to those who have THOUSANDS) to finally get these songs to upload to iTunes Match. Here is what I did, and I REALLY hope this can help someone else.
    #1. When you first open iTunes, you notice in the top/middle info window that iTunes attempts to connect to the iTunes store, AND iTunes match tries to do its thing as well. AS SOON AS YOU OPEN ITUNES, click the small little X next to the progress indicator inside that info window until ALL acivities have stopped.
    #2. Make sure you have the "iCloud Status" sort turned on
    #3. Sort your song list in iTunes by the iCloud Status Look down the list until you get to where all of your "waiting" songs are at
    #4. Select a small managable group (10 worked best for me, more than that would sometimes cause errors and I would have to redo them)
    #5. Right click on the selected group and then select "convert to ACC"
    #6 DO NOT CLICK ON ANYTHING ELSE AFTER 'convert to ACC"
    #7 Once this completes you will hear the normal "ding" that iTunes is finished
    #8. The original files will still be selected with the new ACC versions below each one, not selected. Hit your delete key.(You only want to keep the newly converted ACC files) Also, EVEN IF A FILE WAS PREVIOUSLY ACC, STILL SELECT IT FOR THIS CONVERT TO ACC PROCESS!!!!! If itunes asks if you want to delete these and move to the recycle bin, do so, as you now have another copy that seems to play well with iTunes.
    #9 Now you have the 10 recently converted to ACC songs... Select those ten, right click on them then the "Add to iCloud" option (which for me was the first time I had ever gotten to see it at all)
    #10 iTunes Match should now begin the process of trying to match JUST THOSE SELECTED songs, then upload whatever is needed. Using this system, I HAVE YET to run across iTunes or iTunes match, hanging up, or crashing all together.
    I know this is a bit time consuming, and you COULD do this just for the songs you REALLY wanted to make sure were in the Cloud if you wish. My thought was if I'm going to do it, I might as well do them all.
    I REALLY hope this will help someone as I have read so many forum posts, websites, ect, with people just as frustrated as me. And it even made it more frustrating as I had seen new "solutions" posted online yet said solutions still wouldn't work for me.  If you have any questions, please feel free to comment and I'll try to answer and help!

  • How to find the Names of Most costly Views or Most Time consuming views

    Hi All,
    I had a database consisting of almost 200 views,as a part of Optimization process i want to find out the most costlier views.How to do that.Actually i want the names of the VIEWS,so that i can optimize that.Can any one help me out?
    I had one more doubt in our Database a view is created like view A( which is created by joining several tables).so do i need to add index on this view separately or does it take the index of the tables which i joined? And in our Database i  had created
    a VIEW which is derived from other views(the Joining objects are views not tables),so while i select recoreds from this views which is derived from other views it is taking a lot of time.Is tehre any problem with that?

    Please avoid such double post spread over several forums:
    http://social.msdn.microsoft.com/Forums/en-US/bae4042a-10b8-4d12-aa46-88a05ea37a76/how-to-find-the-names-of-most-costly-views-or-most-time-consuming-views?forum=sqldataaccess
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • It there a way to disable the time consuming animation, when leafing through iCal for Lion?

    When klicking forward or backward the month- and year-view, iCal 5 displays displays a leafing animation. This is not only childish, but also time consuming. And iCal accepts only one click at a time. Klick. Watch the sheet leaf. Klick. Watch the sheet leaf. Klick. Watch the sheet leaf. In iCal 4 it was just: Klick. Klick. Klick. Ready.

    I fully agree with this, one of the examples Apple tries to comply too 'natural' with the OLD world. We have evaluated, we don't need these old leather calendars on our computer devices anymore. Anyway, does somebody know how to get rid of at least the nice but irritating animation?

Maybe you are looking for

  • No sound flash player

    Some one please help me. i have no sound with flash player, and re installed my sound drivers, won't work on fire fox. did something with the directory, and still no sound. someone please help me

  • Aggregation issue for report with bw structure

    Hi, I am facing aggregation issue while grouping reports in webi. We have a BW query with 16 values, which we bring to bw as structure. Out of 16, 8 are percentage values (agg. type should be average). If we bring the data at site level, data is comm

  • Oracle olap cubes

    HI guys there are many things that i couldn't understand about creating cube for olap using Enterprise Mangager ( or cwm2 package ) , i need the most details about : 1- aggregation in cube 2- solve order 3- dimension alias for each hierarchy, what th

  • Safari , Autofill and Wells Fargo Online Banking

    In earlier versions of Safari, I had to type my login/pass to login to Wells Fargo Online banking, autofill wouldn't put it in: https://online.wellsfargo.com/ I figured there was some security issue and just dealt with it. Then in 2.x? it all of a su

  • Error #704

    plz help me solving foll error. rest all files are imported properly. what is the exact location/hierarchy of each jar file? "Viewer.java": Error #: 704 : cannot access directory com\sun\java\swing\event at line 6, column 1