Running a database update in the background

I have a web application which needs to allow the user to
run a process in the background. The user needs the ability to
kick off a long-running process that will move data from a Sybase database to a datawarehouse. However, since the process may take up to 6 hrs, we don't want the process running on the user web browser. We just want them to click submit and then the process is kicked off and the user is notified by email when it is completed.
I tried using runtime to call a java program but, since we use JNDI to do our database lookup, I get the following error:
java.lang.Exception: Unable to get database connection in Move.moveProgram method.<br>java.lang.Exception: Unable to get DB connection in Move.initComm():<br>javax.naming.NamingException: JNDIManager::getDBConnection() getContext/lookup error: javax.naming.NamingException: java:comp/env namespace is only available from within a J2EE component
Any suggestions?
Thanks!
RM

My first suggestion would be to move the entire process out of the web server.
Secondly, don't do it is java. You can probably write a script that will extract it from Sybase in a formatted form and then load it in the data warehouse using the tools that came with it. One advantage would be that it will take significantly less time that doing it with java.
But if you must do it in java, then the client initiates a request. The server code starts a process using Runtime.exec() which is the java program. Or the process runs all the time and just waits for a request to come it to start processing (using a socket.) If you do it that way then you can run it on another box. And you don't have to figure out how to tell if it is already running.

Similar Messages

  • ADF table refresh on update of database field in the background

    Hi,
    I have an ADF Read Only table based on Toplink mapping for a database table. In my scenario, one of the columns (Name) gets updated in the background (through DB adapter from ESB.
    The problem is the ADF table does not refresh to reflect the updated name, on navigating to other pages and coming back (basically page reload).
    The updated name does not reflect until I logout of the session.
    I have used the explicit refresh option for the "findALL" method used by the ADF table. I have also tried setting "NoIdentityMap" option in Toplink Identity Map.
    Please let me know how can I get the table refreshed. I'm using JDev 10.1.3.1 with Toplink.
    Rgds
    Vikas

    I have same problem, and I tried af:poll . It only works when I insert a new record or delete a new record. It doesn't work when I update records.
    I followed this example from Frank Nimphius
    http://thepeninsulasedge.com/frank_nimphius/2007/09/18/adf-faces-using-afpoll-to-refresh-a-table/
    Plus the selection action is not work at all. (My case is multiple selection).
    I just want to know is it possible using af:poll conponment to autorefresh ADF table when I update a record ?
    JDeveloper 10.1.3.3
    Message was edited by:
    xpp

  • Is it possible to run a form offline (in the background)..?

    Is it possible to run a form offline (in the background) by passing all the required parameters? I know this sounds crazy...but like to know if a form can be run in silent mode.
    This will help us in reusing the form for online and background processing.
    Thanks.

    If there is something to run in background, why would that be a form? Normally, a form is supposed to interact with the user.
    If you want to do some data crunching in the database in background, then that should be a job. And, if needed, you may submit the job even from a form, after which you may close the form. RTM for dbms_job and dbms_scheduler - that should help.

  • Steps for Running T-code MIRO in the background

    HI,
    Plz let me know the steps for running T-code MIRO in the background Programatically.
    Regards

    Hi
    check following link it will help to you
    [http://help.sap.com/saphelp_46c/helpdata/en/a8/b992bd452b11d189430000e829fbbd/content.htm]
    [invoice verification in background;
    Regards
    Kailas Ugale

  • Does firefox update in the background?

    I get a notice that Firefox wants to update. I click go ahead. My Webroot Secure pops up to state there is a risk of infection and denotes it as pua. something or other. Is this a real threat or is Firefox attempting a legitimate update? I just installed it two days ago from your website.

    But does firefox do the updates in the background, without any popup windows? If so, then when I see a popup purporting to update firefox, I will know it is fake and let my AV do what it asks to do - get rid of it. The name of the threat was pua.firefoxadmin or something like that. On the other hand, if there is a setting stipulating that I always be asked (I thought I asked at install that firefox just do the update automatically) and this creates a popup, I will allow the update.
    How do I check to see if I am being notified of each update and asked to approve?

  • I downloaded Yosemite and now I cannot open CS 5.5 Production Premium at all, I receive the message that i need to install the legacy Java SE6 runtime. I am running Java 8 Update 25 (the latest). I have uninstalled and reinstalled CS5.5 Prod Prem already

    i downloaded Yosemite and now I cannot open CS 5.5 Production Premium at all, I receive the message that i need to install the legacy Java SE6 runtime. I am running Java 8 Update 25 (the latest). I have uninstalled and reinstalled CS5.5 Prod Prem already again so please don't suggest this. What do I do?

    Try to install java from below link and try once
    Java for OS X 2014-001

  • Need to run a BW query in the background

    Hi,
    Please let me know how we can I run a BEX query in the background & get the output in a specified application folder. Do we need ABAP code or any other process available?
    Regards
    Mahendra

    hi,
    the link for that doc
    https://websmp202.sap-ag.de/~sapdownload/011000358700004400232004E/HowToRSCRM_BAPI.pdf
    if you need to do with abap, take a look Raja's weblog
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    hope this helps.

  • How to run a safari window in the background at all times?

    Ok, so you are probably wondering why I want to do this. Allow me to explain. The website twitch.tv is a streaming service for gamers, and there is a browser plugin specifically for the site called betterttv.
    One feature of this plugin is that you will get a notification whenever someone you are following starts broadcasting, right in your notification center. But because its a browser plugin, and is specifically for this one website, it requires a safari window to be open with the website twitch.tv in order to push the notifications.
    So my question is... how can I make a browser window stay open at all times and run in the background with this website open so that I get my notifications? I had the idea that I could retain the window even when I "quit" safari, because I can run a seperate instance of it in the form of Webkit Nightly which isnt affected by safari not being running.
    But I am still oblivious as to how I would set up a window like this, and it has to start at login in addition to being running throughout the day. (I shut my Mac off at night.) Any amount of help would be appricated

    I'm well aware of how to minimize thanks, and it *is* possible to have a Safari window open if you quit it, because you can run it as a separate instance by using WebKit Nightly...
    I am just looking for the best way to set it up so that a WebKit Nightly window will open upon startup, navigate to that webpage, and hide itself. Preferably in the background. This could be done using a .command file or a startup script in automator. My question is.. What is the best direction to take?

  • How to run a server program in the background on Linux or Windows?

    I just finished writing a Java network application with multiple clients and one server.
    However, I am not sure how I can run the server (SomeServer.class) in the background on Windows. Also when I am running it on Linux, I don't want it to terminate when I logout of the Linux shell.
    To run the server on Linux, should I use a command like this?
    nohup java -cp . SomeServer.class > output.txt &
    Or is there another command, or perhaps some code that I can add to the program so that it would run in the background automatically and/or continues even when I logout of the Linux shell??
    Sometimes, I also like to run the program on a Windows XP machine for testing purpose. How can I do it so that it runs in the background without openning a Console/Command Prompt window??
    (redirecting the standard output to a file)
    And is there an easy way to create a EXE file that runs the program with the default JRE in windows?

    On many UNIX systems there's a utility called detach which will launch the following command in such a manner that killing the shell will not kill the process. On systems that lack this command, I'd find an open source implementation and install it.

  • How to run a JRockit process in the background(Linux ia64)

    Hello,
    I am trying to start a JRockit process 1.4.2 (with a Java app) from an SSH console and make it keep running after I log out. This is on Redhat Enterprise Linux WS 4 with Itanium II processor (ia64).
    The obvious thing such as
    java <options> <class> &
    or even
    nohup java <options> <class> &
    Do not work and the process terminates when I log out.
    Is there a recommended method or a facility to run JRockit in the background as a service/daemon? Does JRockit has switch similar to –Xrs of Sun’s JVM?
    Starting the process on system boot and having to reboot the system to restart it are not acceptable.
    Any help will be greatly appreciated.
    Thanks,
    Zapta

    Zapta did get an answer. You may have missed it if you're using nntp to access the forums, since many newsreaders don't track threads that change the subject. I recommende the using the web UI at dev2dev.bea.com.
    Anyway - Use "-Xnohup" with older versions of JRockit. In recent JRockit versions, "-Xrs" works as well, since we seen problems with people hardcoding that flag into various applications launchers (Tomcat for one).
    Cheers!

  • Running a Java application on the background

    How can I run an applet on the background ? (UNIX and Windows)
    Thanks!!

    Running "in the background" is not really relvent on Windows as CMD[1] does not have this functionallty (that I know of) and you normally execute appliucations in the GUI, unless you are talking about making it a service, running when the user logs off (nohup in UNIX, Windows Services in windows), if thats what you are after, NT JAVA +Service in google.
    [1] If you use a diffrent shell, such as Cygwin you can get this functionallity under Windows.

  • I need help running a Pandora app in the background while on the web

    I cannot run Pandora in the background while on the web

    If you create a console app and place it in a executable jar file, the program will run invisably, even if you have println statements. This is cos the jar file does not launch a console window, so no output will be displayed.
    Hope that is what you wanted

  • Running a Java app in the background on Windows

    I have a Java application that runs constantly on a users computer. (Checking for files to download from a server) I want to have this application run in the background instead of putting a short cut on the Windows task bar. Can anyone direct me to a code sample, tutorial or even just let me know if this is even possible using Java.
    Thanks in advance for your help,
    Jeff Morgan
    http://www.drugtalk.org

    If you create a console app and place it in a executable jar file, the program will run invisably, even if you have println statements. This is cos the jar file does not launch a console window, so no output will be displayed.
    Hope that is what you wanted

  • Running OC4J on Linux in the background?

    I am relatively new to Linux and have been trying to start OC4J either automatically or as a background process (so that I do not have to keep the terminal window open). I tried "$nohup java -jar oc4j.jar &", but OC4J still shuts down when I logout or exit the terminal. Does anyone know of a good way to start OC4J automatically or as a background process?

    You've two choices:
    - install public domain 'screen' program followed by
    running oc4j in a 'screen' session and detach from
    the 'screen'. BTW, 'screen' allows you to reattach
    to an existing session of 'screen'
    - Write a one line shell script and launch this script
    in the background. Now when you exit from your shell
    your oc4j will continue to run.
    -Anantha-

  • Running an SQL script in the background

    Hi all,
    I am executing a simple but long running script. Is there a possibility to have the script executed in the background so that I can close the SQL Developer with the script still being executed?
    Thanks for your help,
    Jan

    Yes, but you'll have to schedule it using DBMS_SHEDULER or the older DBMS_JOB package. The latter is somewhat implemented inside sqldev, using the Jobs node.
    Hope that helps,
    K.

Maybe you are looking for