In forms how to cancel long running process or query in 10g

We have application which is hosted on 10g AS. Some forms has lot of processing to be done and sometimes user wants to cancel the processing in between maybe because he wants to change some value and refire processing.
Based on the search on net 'Esc' key was used in earlier version of forms to function as User requested Cancel operation. How can same be done in 10g. Do we have to do anything in fmrweb.res for this. Is there some setting to be done in forms or in AS for this functionality.
Does this matter on whether JInitiator is used or JPI is used for running the application?
Edited by: suresh_mathew on May 21, 2013 1:36 AM

Hi,
Exit can be used to cancel query mode i.e. in case you go into query mode by Exit you can cancel query mode. Suppose you went into query mode and you have fired query which will take some time to fetch how can I abort it.
In earlier version of form there was 'Cancel' facility wherein if triggered it used to fire an error message 'Ora--01013 user requested cancel of current operation"
With this facility you can abort any query which is executing or any long running process which forms is currently performing.
fmrweb.res would have entry like
27 : 0 : "Esc" : 1001 : "Cancel"
The above entry I picked from OPN
Java Function Numbers And Key Mappings For Forms Deployed Over Web [ID 66534.1]
Unfortunately this is not working for us even if I put this in frmweb.res of 10g AS
Basically I want ability to Abort/Cancel a long running process be it query execution or standard process triggered in the form.
Any advise or help is highly appreciated.
Suresh

Similar Messages

  • How to Cancel Long Running Report

    Hello
    I'm looking for a way to cancel the printing of a long running report programatically? I'm using the CrystalDecisions.CrystalReports.Engine.ReportDocument() class.
    Thanks for your help

    Hi Syed,
    The old viewer was COM based and the new viewer is .NET. CR has the ability if the DB server supports Async communication. Most DB's don't so it wasn't of much use. For those that did the functionality was through custom coding within the Designer only. Async would allow CR to send a stop processing command to the DB server. If the server did not have the ability then CR can only wait for the data to start coming back before stopping the viewer from updating.
    In any event I don't believe the Windows Viewer in .NET has the ability but I will suggest it to the Product group to add the ability in some future version.
    Thank you
    Don

  • How to handle long running Processes in J2EE

    Hi all,
    we want to design something like a process engine on our application server. It should be possible to start processes asynchronous, so we think what we need is a message driven bean to start processes.
    The problem is that there are different states while running the process and it should be possibe to request the current state at the running process. But how we get access to the process after its once started over the stateless message driven bean?
    I hope you can understand the problem and maybe have a solution.
    Thanks & regards
    Rene G.

    You are totally right, but i think my problem is not to design a good software application, my problem is to design this in j2ee. I have not so much j2ee experience in this way. Normally to solve this problem i would think about something like a container which contains one thread for each process. But i read that it is forbidden in j2ee to have your own thread management, so this seems to be a bad solution in j2ee, not at all.
    I hope you understand me a little better now and i hope you don't think that i only want to utilize your knowledge to have less work by myself. I think this is a kind of j2ee specific question, which can be ask in a forum like this, isn't it?
    Thanks & regards
    Rene G.

  • How to cancel long running query by client

    Hi,
    I have the following problem:
    The user calls a service function (business logic) by an application client. Inside the function call an SQL-Query is generated and started on the database (JDBC). Depending on comlexity of the query or search parameter (e.g. search for chemical structures with SYMYX or Accord) the statement is running very long. In this case the user would like to cancle the search by pressing a button in the client application.
    Using preparedStatements there is a cancle method. Because the preparedStatement is inside the called business logic function the preparedStatement is not accessible fom the client or other service methods the normal way. If I understand this correct, I have to make all started preparedStatements public inside my service and then try to access the correct statement by an additional service call (other thread). This sounds a bit like a hack.
    Has anyone this constellation running or is there an other way?
    I would be happy about any hints or suggestions.
    Thanks, Antje.

    Best to post this in the Java > SQL/JDBC Forum

  • How to continue the running process behind the model dialogue box options ?

    How to continue the running process behind the model dialogue box options like this
    In Updation of K7 user press the Cancel Button
    New dialogue box appear with Yes/No options.
    But the backend updation is going on... not Pause the updation.
    Like this how to do ?
    Please provide me code.

    I don't know, if you mean you have done your form or you have solved the problem.
    It's visible your code is only partly reflecting your screenshot, and that's okay to demonstrate the problem you have given a fine example.
    As you marked my suggestion as solution this may not be needed anymore, but here's how I modified your code and used a self made QuestionBox instead of messagebox.
    The essential part is defining a callback method and letting the QuestionBox call back there. It's not essential I used RAISEEVENT, but it's fine as it has all the behaviour and parameters needed to call back.
    Public oTestFrm
    oTestFrm=Createobject("MyForm_Model_to_NonModel")
    oTestFrm.Show
    Define Class MyForm_Model_to_NonModel As Form
    onxx = 0
    Add Object lbl_DispValue As Label With Top=90, Left = 120, Width = 50, Height=30, Caption=''
    Add Object cmd_Start As CommandButton With Top=120, Left = 120, Width = 50, Height=30, Caption='Start'
    Add Object cmd_Stop As CommandButton With Top=120, Left = 190, Width = 50, Height=30, Caption='Stop', Enabled =.F.
    Procedure cmd_Start.Click
    This.Enabled =.F.
    Thisform.cmd_Stop.Enabled =.T.
    Thisform.onxx = 0
    Do While Thisform.onxx < 90000000
    DoEvents
    Thisform.onxx = Thisform.onxx +1
    Thisform.lbl_DispValue.Caption = Transform(Thisform.onxx)
    Enddo
    This.Enabled =.T.
    Thisform.cmd_Stop.Enabled =.F.
    Thisform.lbl_DispValue.Caption = ''
    Procedure cmd_Stop.Click
    * Here, I want NO PAUSE -- (Show running numbers continuously...)
    * how to control Model to NonModel in Messagebox.
    QuestionBox('Really stop the process', Thisform, 'handleanswer')
    Endproc
    Procedure handleanswer
    Lparameters tlYes
    If tlYes && means Stop
    Thisform.onxx = 99999999999999999
    Endif
    Endproc
    Enddefine
    Procedure QuestionBox()
    Lparameters tcMessage, toCaller, tcCallback
    If Not Pemstatus(_Screen,"oForms",5)
    _Screen.AddObject("oForms","Collection")
    Endif
    oMsgBox = Createobject("QuestionBoxForm", tcMessage, toCaller, tcCallback)
    _Screen.oForms.Add(oMsgBox)
    oMsgBox.Show(2)
    Endproc
    Define Class QuestionBoxForm As Form
    Autocenter = .T.
    AlwaysonTop = .T.
    Minwidth = 200
    Add Object label1 As Label With AutoSize=.T., WordWrap =.T.
    Add Object cmdYes As CommandButton With Caption = "Yes", Width=40
    Add Object cmdNo As CommandButton With Caption = "No", Width=40
    Procedure Init()
    Lparameters tcQuestion, toCaller, tcCallback
    Thisform.label1.Caption = tcQuestion+" ?"
    This.AddProperty("oCaller",toCaller)
    This.AddProperty("cCallback",tcCallback)
    This.Width = Max(This.Minwidth, Thisform.label1.Width)
    Thisform.label1.Left = (This.Width-Thisform.label1.Width)/2
    This.Height = Thisform.label1.Height+48
    This.cmdYes.Left = This.Width/2 - 10 - This.cmdYes.Width
    This.cmdNo.Left = This.Width/2 + 10
    This.cmdYes.top = Thisform.label1.Height+24
    This.cmdNo.top = This.cmdYes.top
    Endproc
    Procedure cmdYes.Click
    #Define clYes .T.
    Raiseevent(Thisform.oCaller,Thisform.cCallback,clYes)
    Thisform.Release()
    Endproc
    Procedure cmdNo.Click
    #Define clNo .F.
    Raiseevent(Thisform.oCaller,Thisform.cCallback,clNo)
    Thisform.Release()
    Endproc
    Enddefine
    I didn't yet introduced a timer for counter display updates. As you see the counter hangs a bit, if you mouse over your form, but it is a way of multithreading without using a separate thread and instead keep the rest of the application active by DOEVENTS
    in the long running loop code.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

  • Long running process/query

    One of my after submit processes involves a lot of processing, temp tables, sorting, aggregating, etc.
    When this process is invoked from a page, is there a way to put up a generic 'Processing...' page that auto refreshes and when my back-end process is done, takes me to my results page?
    Thanks

    Let me see if I understand you...
    So, the first page (that would have invoked the long running process) branches to the "processing page". That page has a onload that does doSubmit(). The after submit process on this processing page calls my long running process via dbms_job. When the long running process ends, the branch on the processing page takes me back to the first page (or whereever).
    But then as far as the browser is concerned, the processing page never "finishes loading". IE's progress bar would creep ahead sloooowly and it would appear as if the page is loading for a looong time!
    Wouldnt it be cleaner to use the META refresh tag like John was suggesting?
    Also, using either of your approaches, how would I allow the user to "Cancel" the long running process and go back to the first page?
    Could you please put up a quick sample of this in action on htmldb.oracle.com?
    Thanks

  • ORABPEL-05002 for long running process

    Hi everybody,
    My question is related with a long running process I have designed and which, after running for a couple of days, ends by reporting the ORABPEL-05002 error:
    ===============================================================
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ===============================================================
    Looking in the Manual Recovery screen, I can see an Activity I can recover. It's about an assign Activity where I'm doing a single boolean assignation.
    Of course, together with the ORABPEL-05002 error I got also the 'Transaction was rolled back: time out' message. Note that I have modified the transaction-timeout value to 180000. The error occurs during the night, with no heavy load of the server.
    Recovering the assign activity brings back the process in the running state.
    My process pattern:
    while (1 == 1) {
    do activity;
    wait_timeout();
    So, I have the following questions:
    1. Which is cause of this error?
    2. How may I automatically recover this lost activity? RecoveryAgent?
    Any suggestion is appreciated.
    Regards,
    amo
    P.S: the full stack of error messages reported in domain.log:
    ===============================================================
    <2006-09-18 08:08:34,101> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
    java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:873)
         at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.Exception: No Exception - originate from:
         at com.evermind.server.ejb.EJBUtils.makeException(EJBUtils.java:871)
         ... 10 more
    javax.ejb.EJBException: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.handleWorkItem(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:1479)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:08:34,129> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.PerformMessage"; the exception is: Transaction was rolled back: timed out; nested exception is: java.rmi.RemoteException: No Exception - originate from:java.lang.Exception: No Exception - originate from:; nested exception is:
         java.lang.Exception: No Exception - originate from:
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,236> <ERROR> <SRH.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "activity manager": Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
    ORABPEL-02094
    Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
         at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
         at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
         at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
         at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
         at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
         at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
         at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
         at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,274> <ERROR> <SRH.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    ORABPEL-02094
    Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.core.ScopeContext.getScope(ScopeContext.java:213)
         at com.collaxa.cube.engine.core.WorkItem.setCubeInstance(WorkItem.java:259)
         at com.collaxa.cube.engine.core.WorkItemFactory.init(WorkItemFactory.java:68)
         at com.collaxa.cube.engine.core.WorkItemFactory.create(WorkItemFactory.java:58)
         at com.collaxa.cube.engine.adaptors.common.BaseWorkItemPersistenceAdaptor.load(BaseWorkItemPersistenceAdaptor.java:147)
         at com.collaxa.cube.engine.data.WorkItemPersistenceMgr.load(WorkItemPersistenceMgr.java:75)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5185)
         at com.collaxa.cube.engine.CubeEngine.load(CubeEngine.java:5173)
         at com.collaxa.cube.engine.CubeEngine.expireActivity(CubeEngine.java:2136)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:145)
         at com.collaxa.cube.ejb.impl.ActivityManagerBean.expireActivity(ActivityManagerBean.java:116)
         at IActivityManagerLocalBean_StatelessSessionBeanWrapper52.expireActivity(IActivityManagerLocalBean_StatelessSessionBeanWrapper52.java:645)
         at com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessageHandler.handle(ExpirationMessageHandler.java:43)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-09-18 08:09:05,275> <ERROR> <SRH.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
    ORABPEL-05002
    Message handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the exception is: Scope not found.
    The scope "BpSwt2.30995" has not been defined in the current instance.
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:152)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ===============================================================

    These are the possible cause to the problem and their solutions:
    Poor performance of the dehydration database If you are using Oracle Lite as dehydration store, please switch to use Oracle 9i or 10g. If Oracle 9i/10g is already in use, check the database parameter 'process' and 'session' to make sure it can handle the expected throughput.
    OC4J has too few available connections to the dehydration database. Increase the maxConnection number of the BPELServerDataSource at the BPEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/data-sources.xml (for developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/data-sources.xml (mid-tier installation).
    Size of message is too big Two ways to deal with this problem:
    Increase the transaction timeout at PEL_HOME/integration/orabpel/system/appserver/oc4j/j2ee/home/config/server.xml (developer edition) or IAS_HOME/j2ee/OC4J_BPEL/config/server.xml (mid-tier installation)
    Decrease the auditLevel from BPELConsole -> Manage BPEL Domain -> Configurations tab. Doing so will reduce the amount of data saved to the dehydration store.
    Cheers
    Anirudh Pucha

  • Cancel long running statement in Oracle Lite (OLITE_10.3.0.3.0 olite40.jar)

    On JDBC statement, there is the method 'cancel' to instruct the database to cancel an executing statement. This works fine on Oracle server database, but not on Oracle lite database. The method call 'cancel' just blocks and the running statement is never interrupted.
    The example I tried is very simple. There is a thread started which executes a long running statement. I noticed, that when moving the cursor forward by calling rs.next(), it just blocks. That would be ok, if the statement could be canceled from within the main thread by stmt.cancel. But this call blocks as well with no implact on the running statement. Why is that? Do I miss something or is it not possible to cancel a long running statements in Oracle Lite?
    In the following my code snipped:
    public class CancelStatement {
         private static final String PATH_DB = "XX";
         private static final String PATH_LIB = "XX";
         private static final String CON_STRING = "jdbc:polite:whatever;DataDirectory=" + PATH_DB + ";Database=XX;IsolationLevel=Read Committed;Autocommit=Off;CursorType=Forward Only";
         private static final String USER = "XX";
         private static final String PASSWORD = "XX";
         public static void main(String args[]) throws Exception {
              System.setProperty("java.library.path", PATH_LIB);
              Class.forName("oracle.lite.poljdbc.POLJDBCDriver");
              Connection con = DriverManager.getConnection(CON_STRING, USER, PASSWORD);
              Statement stmt = con.createStatement();
              Thread thread = new Thread(new LongStatementRunnable(con, stmt));
              thread.start();
              Thread.sleep(3000);
              // stop long running statement
              System.out.println("cancel long running statement");
              stmt.cancel(); // XXX does not work, as call is blocked until out of memory
              System.out.println("statement canceled");
         private static class LongStatementRunnable implements Runnable {
              private Connection con;
              private Statement stmt;
              public LongStatementRunnable(Connection con, Statement stmt) {
                   this.con = con;
                   this.stmt = stmt;
              @Override
              public void run() {
                   try {
                        System.out.println("start long running statement...");
                        // execute long running statement
                        ResultSet rs = stmt.executeQuery("SELECT * FROM PERSON P1, PERSON P2");
                        while (rs.next()) { // here the execution gets blocked
                             System.out.println("row"); // is never entered
                        rs.close();
                        stmt.close();
                        con.close();
                        System.out.println("long running statement finished...");
                   } catch (Exception e) {
                        e.printStackTrace();
    }I would be very glad if you could help me.
    Thanks a lot
    Daniel
    Edited by: 861793 on 26.05.2011 14:29

    Unfortunately Oracle Lite doesn't have this option. You can call your statement from a second thread as you have done, but you won't be able to kill or cancel this operation. The only way to get fix this is by rebooting. You can use process explorer to find the dll process that is executing the SQL, but the tables will be locked and sync would be locked as well until the process is finished running in shared memory.

  • How to cancel an running load

    Hi Gurus,
         I wanted to know how to cancel an running load..is it to change the status into red n deleted it from the cube..??
       once i did it like this in my system but after sometime the laod again automatically converted into green n continue its loading..
    can anyone tell me on how to cancel an running load...
    waiting for reply
    Ravi

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Thanks,
    JituK

  • ProgressIndicator and  hourglass for long running processes

    Hi all,
    Iam using Oracle ADF 10g with EJBs.
    I have a long running process for which I want to give the user an indication of its progress. The process is run upon clicking a submit button.
    I have tested the use of the combination of progressIndicator + poll according to the example of Gerger consulting( http://gergerconsulting.blogspot.com/2007/04/adf-faces-progressindicator-example-for.html) but it did not work. The problem is that my long running process hangs the page and the progress bar does not work until the process has finished.
    I have seen a similar post in this foum (Re: How to run long background jobs in ADF applications where a user complains that there is not an Oracle method for running asynchronous processes from Oracle ADF.
    I've tested to isolate my asynchronous process with the progressIndicator + poll in a single ADF page. The process is being activated from an invokeAction from the executables of the pagedef file. But again the process hangs the page and the progressIndicator does not display at all.
    So I have abandoned the idea of the progress indicator and Iam thinking of using an hourglass.
    Is there an example or guidelines of how I can do it?

    Thanks John for your reply,
    Iam still working on the progressIndicator. I have read the discussion thoroughly quite many times.
    One thing I have not yet figured out from your discussion is how you manage to create the long-running-process thread within an action method within the managed bean and make the thread still be active, while the parent action method has finished.
    Usually the managed beans attached to a .jspx pages has request scope. So a commandButton's action method (that will spawn the long running thread) will finish much earlier than the thread and it will kill the thread.
    Thanks,
    Dimitris

  • GF 3.1.1 Admin Console Freeze -- A long-running process has been detected

    I installed Glassfish 3.1.1 on both sparc and intel servers for solaris 10 & 11 platform. All my servers have the same symptom when I access the admin console. The console freezed and pop-up a message "A long-running process has been detected". There is nothing I can do at this point. I've tried accessing from different PC with different browsers (IE, Firefox 5, Chrome and Safari), but nothing is working including clearing the cache. Also, tried uninstall and install again (with and without updatetool) many times. Any idea how do I stop the popup message? Am I the only one has this problem? I'm using JDK 1.7 (GF 3.1.1 support JAVA 7). I need help!!!!!
    Thanks,
    - Johnny

    The only fix I know of for this issue is to reboot the host.
    If there is another fix someone please let me know as I have users who run into this often.
    Thanks
    Bonnie.Partridge

  • Question : Scheduling a Long Running Process in BPEL

    Hi All,
    I have a doubt regarding deployment and scheduling of a Long Running Process in BPEL console like the way we schedule a concurrent program in Oracle Apps.
    Business Scenario:
    We have developed a BPEL process to pull data from the Database, do the required transformation and then enqueue the transformed data in a queue present in another database.
    Then a Java program will pick the data from the queue and then generate an XML file and send it to FTPserver of the Trading Partners(TP's).
    We have two Trading Partners and hence the generated XML will be put into the appropriate FTP servers of the TP's.
    The BPEL processing for both the Trading Partners is identical. Only the generated XML is put in different FTP servers.
    My question here is:
    1. Since the processing is same for both the TP's, how can we use the same process for both the Trading Partners.Can we handle it in the BPEL process itself ?
    2. Is there any way to schedule the same process in BPEL console, to first run for Trading Partner TP1 and wait for say 15 mins and then run for another Trading Partner TP2 and this cycle should continue since we will be deploying it in production environment and continuous updation of the transactions will be happening in the database.
    So far my knowledge in BPEL goes, i could not find any way to schedule a process in BPEL console. If any one has come across similar scenario, please post your updates/approach which will help us in defining the architecture for our client.
    Thanks In Advance,
    Cheers
    Dibya

    Hi Marc,
    Thanks a Lot for ur inputs.
    Need some more clarification for quetsion no.1 in my previous post.
    From our BPEL process we are calling a package which takes the Trading Partner name as the input and some other parameters. Our BPEL process will be run for both the Trading Partners since the processing is identical.
    If we develop two different processes for both Trading Partners, then there will be locking issues in the database since both the processes will refer to the same table.
    Hence we were looking for an option where we can use the same process for both the Trading Partners. Is there any way to handle it in BPEL process.
    Your inputs will be really helpful.
    Thanks In Advance,
    Dibya

  • Call long running process and return immediately

    Hi everyone,
    Here' my problem : I am calling an onDemand application process when clicking on a button. It's a very long running process; and while waiting for the response my browser stops responding (white page).
    So, is there a way to call a process and return immediately to the javascript. The process will set a field to a given value when it finishes. In javascript side, I can then check in a while boucle the value of this field to know if the process has ended.But I dont know how to return just after the application process call ...
    Thanks and best regards,
    Othman

    I presume that you can achieve that by means of a batch job.
    You can use an automatic page reload every X seconds until a certain "flag" (or similar mechanism) changes state and check it in a before header process. In the meanwhile you can display some animated GIF for instance.
    Once the processing is completed you remove the reload timer from the header or you branch to a different page using a programmatic technique like procedure owa_util.redirect_url.
    Bye,
    Flavio
    http://www.oraclequirks.blogspot.com/search/label/Apex

  • Correlating to long running process

    I'm trying to set up a long running process that handles item-storage. For handling of the BPEL I have a process which needs to tell the long running process which item is stored in that particular storage. For example: i have 200 bins, which can contain up to 100 items. As the bins are handled individually (when filled), I need the 100 bpels that handle the items to wait until the long running process is finished.
    So, I figured to make a BPEL that accepts 2 messages: 'initiate' and 'addItem'. Initiate sets up the bin and waits until filled before handling the bin.
    The addItem is placed in a onMessage branch. This branch should be 'create Instance = no", as the instance is created when the bin is initiated. I get one initiate message and 100 addItem messages. Initiate & additem are correlated, so I should only receive the messages for this particular bin. However, when I try to compile this process, I get the following message:
    Error(36): [Error ORABPEL-10050]: no create instance activity [Description]: in line 36 of "L:\workspaces\MyTests\LongRunningProcess\LongRunningProcess.bpel", There is not an activity (receive/pick) to start the process. [Potential fix]: You might want to set createInstance="yes" for this <receive> / <pick>.
    Well, the 'fix' is not quite what I had in mind. I cannot have a createInstance='yes' here, as the instance is already created when I started handling the bin. Besides, I have to handle 100 incoming messages, not just 1.
    I have a need for this kind of pattern, as I have a lot of converging & diverging messages in our processing. Diverging is easy, converging is giving me a lot of headaches.
    Anyone has ideas how to help me find a solution for this? Thanks in advance!

    Hi,
    1) You could use conversation for the first issue which are designed for this usecase.
    Conversations are essential for any web service involved in asynchronous communication. This includes web services that communicate with clients using callbacks or polling interfaces, and web services that use controls with callbacks.
    More info at http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/converse/navMaintainingStatewithConversations.html
    Thanks
    Vimala

  • HTTP Server Hangs on Long Running Process

    Hi,
    We are having an issue with our production environment where long running processes i.e. > 5 mins will cause the client application to stop responding. We notice that this is only affecting forms which has no activity during the busy period i.e. forms which call a back end DB procedure or function and waits for a response from the DB to say that the process is done.
    Checking on the process itself from the DB shows that the process has completed successfully but somehow there's no response back to the client to say that it's completed. As a result, the client will be in busy status forever.
    We are sure that the issue originates from the HTTP server because when we by-pass the HTTP server i.e. send the request directly to the Apps server, this behaviour is not happening.
    By thew way, we are running on Oracle Forms 11g using Weblogic.
    Changes made so far but to no effect:
    maxBlockTime=1800000 (web.xml)
    keepAlive=Off (httpd.conf)
    Timeout=1800 (httpd.conf)
    FORMS_TIMEOUT=60 (formsweb.cfg)
    heartbeat=4 (formsweb.cfg)
    Session-Timeout=30 (web.xml)
    Can this be related to network configuration? If yes, what are the things to look for?
    Thanks.

    as the response came from the server your httpd service is not getting active for that you
    need to keep the httpd service alive so that the response can be obeyed
    just try this
    keepAlive=On (httpd.conf)
    ..

Maybe you are looking for