Save Points to override APEX DML functions

I have some APEX pages that run some underlying procedures which do DML functions on 6 different tables. At the start of each of the DML functions which are in PL/SQL packages, I have set Save Points. I process thru a number of additional pages and reach a point where I may need to commit or rollback all those prior changes. Whenver I try to rollback I get ORA-01086 Savepoint 'xxx' never established. How can I check to see if the savepoint gets created so I can determine why the rollback function doesn't work.

It's likely that APEX is performing a commit during processing, and thus erasing your savepoints.
See +{thread:id=708781}+ and +{thread:id=2130631}+ for discussion on when APEX will commit. If any of the processing will cause APEX to perform a commit, see if it's possible to reorganize things so that APEX session state processing occurs before/after your transactional processing.
(Please update your forum profile with a better handle than "user8014695")

Similar Messages

  • Save Point for Cancel Functionality

    Hi all,
    I followed Frank's document below on how to implement the Cancel functionality using "Explicit ADFm Save Points in ADF Taskflows":
    http://www.oracle.com/technology/products/jdev/tips/fnimphius/cancelform/cancelForm_wsp.html
    However when running the application with logging turned on, there was this warning message:
    *******WARNING*****: createSavepoint not supported for DCBeanDataControl.*
    Upon some digging, I found that the createSavePoint method in DCBeanDataControl returns null, while its base class DCJboDataControl calls the application module's passivateStateForUndo() method.
    I hope to implement the save point functionality declaratively, can someone tell me how to obtain the DCJboDataControl class instead of DCBeanDataControl so that the createSavePoint method works?
    Thanks!
    Hai Liang

    John,
    I think there might be a problem with our view project not "knowing" that the model layer is using ADF BC. The situation is like this, we first built the ADF BC model project (the EOs, VOs and AMs). Then we went on to create a viewController project (in the same Application workspace). Because the Applications Modules from the model project appear in the Application > Data Controls tab, we just used the AMs there and assumed that the viewController project is aware that it is using ADF BC components.
    Is there some setting we have to define inside the viewController project to make it "aware" that the model layer utilizes ADF BC and thus enable the "savepoint cancel" functionality?
    Thanks!
    Hai Liang

  • How to create more than one save point in session

    Hi,
    I'm using Jdev 12c.
    I'm trying to use the SavePoint in ADF. When I try to use createSavepoint() function of SavePointManager to create savepoint I met a problem is only one row of savepoint is created in DB (table ADF uses to kept the savepoint in DB) and it overrides the old row whether how many times I uses createSavePoint() function. I want to when I call createSavePoint(), a new row of savepoint is created instead of overriding . Below is my code:
            ControllerContext controllerContext = ControllerContext.getInstance();
            String savePointId = null;
            if (controllerContext != null) {
                SavePointManager savePointManager =
                    controllerContext.getSavePointManager();
                if (savePointManager != null) {
                    //creating the save point
                    savePointId = savePointManager.createSavePoint();
                    //putting the save point id into session scope
                    ADFContext.getCurrent().getSessionScope().put("savePointId",
                                                                  savePointId);
    Could anybody help me this problem?
    Thank you very much.

    Dear Frank,
    Thank you so much for your answer. Beside the save point functionality to save the state and values on the screen, do you know other ways to do the same function? Once again, thank you so much.
    Linh Nguyen.

  • Apex emailing functionality

    Hello all,
    i have trawled the net for info on the apex email functionality, nothing seems to be what i am after i don't think!
    I would like to be able to set up something that emails a group of select people (which i can specify) every time someone inserts a new row into a table using a form on apex. How would I go about doing this?
    Using: apex version 3.2.1 (due to upgrade shortly, there isnt many of us on the apex team, just me in fact!) and HTTP Server to host
    Thanks in advance !

    Hi,
    You can use util_tcp package for this
    See below
    01. Create below procedure
    PROCEDURE Send_Mail (sender    IN VARCHAR2, recipient IN VARCHAR2, subject IN VARCHAR2, message   IN VARCHAR2)
    IS
        rc NUMBER;--integer;
        mailhost   VARCHAR2(30) := '127.0.0.1';
        mail_port NUMBER(2) :=25;
        mail_conn   utl_tcp.connection;
    BEGIN
        --debug_message('-------------------------------------:: Send_Email ::-------------------------------------');
        mail_conn := utl_tcp.open_connection(mailhost, mail_port);
        dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'HELO '||mailhost);
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'MAIL FROM: '||sender);
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'RCPT TO: '||recipient);
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'DATA');                 -- Start message body
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'Subject: '||subject);
          rc := utl_tcp.write_line(mail_conn, message);
          rc := utl_tcp.write_line(mail_conn, '.');                    -- End of message body
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          rc := utl_tcp.write_line(mail_conn, 'QUIT');
          dbms_output.put_line(utl_tcp.get_line(mail_conn, TRUE));
          utl_tcp.close_connection(mail_conn);
        EXCEPTION
            WHEN OTHERS THEN
                 dbms_output.put_line(SQLCODE||'-'||SQLERRM);
    END Send_Mail;02. Then create a trigger on your table as below and call this procedure
    CREATE TRIGGER your_table_name_trg
    BEFORE INSERT
    ON your_table_name REFERENCING NEW AS New OLD AS Old
    FOR EACH ROW
    BEGIN
    Send_Mail(sender='[email protected]', recipient='recipient email addresses', subject=>'subject of the email' , message=>'Content of the email');
    END your_table_name_trg;* If this answer is helpfull or correct then please mark it and grant the points.

  • How to use Save Point in Batch Execution of  java transaction updates .

    HI.. ALL
    This is going to be very important to all and if needed history should be rewritten...
    Does any one.... Any one has ever thought of Execution of a Batch - jdbc using Save Points Concept ???
    If this has been ever implemented than I am sorry for my comments..
    If NOT---
    Then any one has idea or code or any thoughts or alternatives for this... This goes like this-->
    If we have a batch file which has All Inserts , Updates and delete statements and we are reading that file in java program and executing the file in a batch execution.. Now java provides only 2 option 'START AND END' for batch execution. But ever dreamed about having Save Points in execution of a batch ?
    You might be thinking why Save points needed in batch? if any one wants to have save points then they can go with normat step by step execution of the jdbc calls Why in batch ?
    Trust me this is very important in various areas of development which will bring an ease of writing the program efficently..
    Does any one have any idea in this regard of having SavePoints in batch execution is highly welcome.
    Thanks
    wahed
    Edited by: wahed on Aug 8, 2008 12:53 AM

    If your database supports SAVEPOINT savepoint_name sql and ROLLBACK [WORK] [ TO [ SAVEPOINT ] savepoint_name] sql, you can try to add those sqls into your sql batch.

  • No Controller Transaction - No Save Point on TaskFlow Entry

    All,
    We have an application built on ADF using JPA as the backend. We are not using BC4J. In all taskflows we have the following settings
    1. No Controller Transaction
    2. No Save Point on TaskFlow Entry (Unchecked). i.e. a Save Point is created for on each task flow entry.
    However, I read in one of performance guidelines to select the "No Save Point on TaskFlow Entry " when No Save point is required as it saves the expensive model passivation at the taskflow startup.
    My question is, does the "No Save Point on TaskFlow Entry " selection has any effect when "No Controller Transaction" option is selected. Does ADF try to passivate the model even when controller is not managing transaction when "No Save Point on TaskFlow Entry" transaction is unchecked.
    I tried to test it in my local environment by checking the "No Save Point on TaskFlow Entry " but could not really conclude whether it has any siginificant performance improvement.
    Any inputs on thsi would be of real help in deciding whether to go ahead and select this option in all our taskflows.
    Thanks,
    Rama

    Rama,
    I can't say from any experience whether it has any effect even with no controller transaction.
    However, it doesn't sound as if you'll be using the savepoints, so it seems safe to me to disable the save points.
    John

  • Help on OLAP DML function – "joinchars"

    Hi,
    We have built a cube called 'CubeTest' which has a measure called 'TestMeasure' of decimal data type, using Oracle AWM v10.2.0.3.0A.
    Now, I am using "Oracle OLAP Calculations v1.2.5", as available on OTN homepage, to define my own calculated measures using OLAP DML for this cube.
    I have defined the following two measures (for both, Calculation Type is 'Equation' and both are using free-form equations defined over TestMeasure):
    1. Calculated_Measure1
    2. Calculated_Measure2
    Now, I want to define a third calculated measure in a way that it represents a concatenation of the above two measures suffixed with some standard text.
    e.g. A Typical value of the third calculated measure will be like:
    Calculated_Measure1 + 'ABC' + Calculated_Measure2 + 'XYZ'
    Here, the '+' sign indicates the idea of concatenation.
    To achieve the above result, I am using the OLAP DML function "joinchars" to define a free-form equation like the one below:
    joinchars(Calculated_Measure1,'ABC',Calculated_Measure2,'XYZ')
    Now, the issue is that calculation like the one above, using joinchars is not being created successfully. I tried pre-qualifying (and not pre-qualifying) the names of the calculated measures with the cube name and also experimenting with the “Show” command. Also, once the calculation definition fails to get created, I am not even being able to attach my AW in R/W mode as I get the error as below:
    oracle.AWXML.AWException: java.lang.NullPointerExceptionat oracle.AWXML.AW.readAWDefinitions(AW.java:1339)at oracle.olap.awm.dataobject.aw.WorkspaceDO.getModelAW(WorkspaceDO.java:803)at oracle.olap.awm.dataobject.aw.WorkspaceDO.getModelAW(WorkspaceDO.java:749)at oracle.olap.awm.navigator.node.WorkspaceNode.getModelerViewChildren(WorkspaceNode.java:368)at oracle.olap.awm.navigator.node.WorkspaceNode.getChildren(WorkspaceNode.java:341)at oracle.olap.awm.navigator.node.BaseNodeModel.refreshData(BaseNodeModel.java:74)at oracle.olap.awm.navigator.node.BaseNodeModel.dTreeItemExpanding(BaseNodeModel.java:221)at oracle.bali.ewt.dTree.DTreeDeferredParent.__fireExpansionChanging(Unknown Source)at oracle.bali.ewt.dTree.DTreeDeferredParent.setExpanded(Unknown Source)at oracle.olap.awm.navigator.node.BaseNode.expandHelper(BaseNode.java:2186)at oracle.olap.awm.navigator.node.BaseNode.access$400(BaseNode.java:109)at oracle.olap.awm.navigator.node.BaseNode$ExpansionThread.run(BaseNode.java:2136)Caused by: java.lang.NullPointerExceptionat oracle.AWXML.AW.readAWDefinitions(AW.java:1313)... 11 more
    For the above issue, I have the following questions to seek your help on:
    1. First, obviously, to know what is wrong with the usage of "joinchars" in this scenario.
    2. If we use Oracle OLAP Calculations v1.2.5 to define any calculations, and if for some reason, the calculation is not defined successfully, is there any way to see what went wrong and where (this is because if your calculation definition fails, the Oracle OLAP Calculations v1.2.5 utility just exits out without giving any significant information on the reason for failures).
    3. When we create any new calculation and then click on “Define Calculations” button, the Oracle OLAP Calculations v1.2.5 utility prompts us with the message “Do you want to update the AW views after creating the calculation (Y/N)? – Can you please help me with the details on the implications of stating a Y or N to this message.
    Any help on these questions is much appreciated.
    Thanks and Regards,
    Piyush

    Piyush..
    The Error you get on using the rpr command is a display error, its not a functionality issue. Think of this as something similar to the sqlplus buffer overflow issue if you have a pl/sql program which outputs a lot of dbms_output.put_line statements.
    So if you get a display error, restrict the cube or the dimensions to a reasonable number and check your output. Example: Take every user dimension and restrict them to a few values... (say, 5 products, 1 channel, 1 location, 1 organization, 2 time periods)..
    Rpr <<expression>>
    will return the expression for every cell in status.. Depending on the dimensions that the expression is based on, for every dimension depending on the number of values (members) in status, the <<expression>> is evaluated and output'ed.
    No of cells in report is Cross product of each dimensions status (statlength).. For example above.. 5*1*1*1*2 = 10 cells.
    Shw <<expression>>
    will return the expression for the first cell in status.. 1st value (member) in status for every dimension that <<expression>> depends on.
    Hence Shw <<expressions>> does not lead to a display error since the output is restricted (small).
    Using the OLAP Calc utility to define the formula (the utility uses java olap apis), you may need to do something to protect the single quotes so that the expression gets evaluated with single quotes in the OLAP DML formula.
    You can try...
    joinchars(CUBE1_CMEAS1, \'ABC\', CUBE1_CMEAS2, \'XYZ\')
    If above doesn't work, just ask for help regd how to translate a formula expression containing single quotes (formula is correct in OLAP DML) into the AW via the Spreadheet utility.
    HTH
    Shankar

  • Save point with POJO DataControl not saving model state

    Hi Guys,
    JDEV 11.1.1.6 64bit
    I was able to get save points working with ADF BC (AppMod, View & Entity objects)
    but when I tried to do the exact same with Pojo DataControls, I won't save
    the current state of the model - meaning things are not "selected" to the
    proper record when the SP is restored. I don't get any errors, it just
    shows the wrong data.
    Example:
    The BTF is marked as must have transaction(tried either way), but this is Pojo, and doesn't support Trx.
    edit-emp-dept.jspx (with BTF Region)
    BTF START
        STEP 1: RichTable with bindings to Pojo DataControl (value="#{bindings.allDepts.collectionModel}")
                     (user selects the 3 record => sales department)
        STEP 2: Edit Sales Dept & on click to next step create SP
        STEP 3: View Emps (Rich Table of ALL emps in that DEPT)
        STEP 4: Edit Emp
        FINAL: COMMIT (save to pojo list) or CANCEL (don't save to pojo list)
    /BTF END
    At STEP 1 -> STEP 2, the SP is created, and when I close the browser at STEP2, 3  or 4, and
    restart, and choose SP to restore, it takes me to proper page (STEP 2)  but the wrong Department is
    selected to edit (it shows "Finance" instead of "Sales") & if I hit my ADF back button, it shows
    the table with "finance" selected.  In the ADF BC world it works perfectly.
    I know the docs say: the ADF Model is saved, so the question is why bindings.allDepts.collectionModel
    not "saved" here for Pojo DC and the ADF BC af:table value="#{bindings.DepartmentsView1.collectionModel}"
    it is "saved".
    Thanks for any insight or work-around.
    Sincerely,
    Joel
    edit-emp-dept.jspx:
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:form id="f1">
            <af:region value="#{bindings.btfpojodc1.regionModel}" id="r1"/>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>

    Hi,
    the problem with POJO DC and other non-ADF BC models is that they don't passivate their state. In JDeveloper 12c we allow developers to extend their POJO classes with ADF lifecycle methods that allows them to save the model state themselves. Its a known issue that the transaction state cannot be saved for non-ADF BC models. I checked the bug database for bugs filed against this behavior but could not find one- I can imagine that with 12c we would have a chance to allow developers to handle passivation / activation for non-ADF BC model states. So if this is a feature you need then filing an enhancement request would make sense
    Frank

  • Overriding a single function in sidekick.js?

    I made a change to the function called when the "Activate" button is clicked in the CQ 5.4 sidekick.
    The function is "getPublishConfig" in sidekick.js.
    It works fine when I clone the entire sidekick.js file to [1], and then modify the existing method.
    However, I would like to be able to override the getPublishConfig function code only, instead of the entire siteadmin.js, to help control the impact on future CQ upgrades.
    I have tried these approaches below, but without luck.  If you have any other direction that perhaps I should look at, I would appreciate the tip.
    Thanks!
    Sara
    Approach 1: I tried the clientlibs approach, but the new code was not being picked up- it was the OOB code that was being executed.   I am pretty sure the clientlibs was set up correctly, because this approach did work for overriding the SiteAdmin.Actions.js functions.  The custom js file contained code like [2].
    Approach 2: I also tried to modify init.jsp in the template folder as shown in [3].  This worked in the simple activation cases.  However, when there are assets on the page that also need activating, and the Asset Reference Dialog is shown, then the AssetReferenceSearchDialog.js [4] script fails with an error because dlg.path.push is undefined.  I wonder if it is possible that this approach may have worked for simpler functions, but because of the level of indirection it does not work here?
    [1] /apps/cq/ui/widgets/source/widgets/wcm/Sidekick.js
    [2] CQ.wcm.Sidekick.getPublishConfig = function() { [snip--custom code]};
    [3] CQ.WCM.launchSidekick("<%= currentPage.getPath() %>", {
                propsDialog: "<%= dlgPath == null ? "" : dlgPath %>",
                locked: <%= currentPage.isLocked() %>,
                actions: act,
               getPublishConfig : function() {  [snip--custom code]};
    [4] /libs/cq/ui/widgets/source/widgets/wcm/AssetReferenceSearchDialog.js

    I think there is a syntax error in line
    document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
    end tag <\/script> is wrong.

  • Should we use same datasource for Internal connection and Save Point ?

    Hi,
    AM configuration has an internal db connection setting, adf-config.xml also has an db connection setting for Save Point, should we all set to the same database source of the system or should we create a seperate datasource which is used only for AM internal db connection and Save Point?
    jdev: 11.1.2.1
    Many thanks!

    Hi,
    its all up to you and whether you have security concerns if the save point is saved with the business data.
    Frank

  • Cannot save files or use the undo function in InDesign CC

    As of this morning, I am not able to save files or use the Undo function in InDesign CC. Tried many fixes but nothing has worked. I have a ton of work to get done today -- any solutions for this???

    Im viewing this thread because its just happened to me again... my solution is below.
    Im currently running the latest version of  indesign cc (9.2.1) on my brand new 13" macbook pro. (OSX 10.9.4)
    As noted earlier in this thread, when this happens, before you give up and close in frustration,  EXPORT the file as IDML, and your all good!
    Ive had this issue on several occasions using Indesign CC since October. Here are my 2 'Usual Suspects' when this occurs:
    1. culprit: SUITCASE FUSION 5 – deactivate 'auto activation' from within Indesign Prefs. In some cases, i didn't even restart Indesign (much less my computer) for this to work.
    (menu: INDESIGN/PREFERENCES/ SUITCASE FUSION 5 AUTO ACTIVATION PREFS (bottom of submenu list)  Uncheck the top box,  'Auto Activate....')
    Im assuming this was rechecked to auto-activate after an update. Hasn't happened in a while—but sure enough, the auto-activate box was checked again.
    Its a pain having to manually-activate fonts, but its alot easier than redoing a bunch of work!
    2. culprit: CRASH PLAN (online backup)– actually, ive seen this happen with a couple of backup programs. I don't know that this is for sure an issue, but it did resolve the saving issue earlier this year.  I just pause backup for a few hours, then resume. Seems to be ok.
    Steps i took:
    Quit Indesign CC (AFTER EXPORTING the file as IDML!)
    Pause backup within CrashPlan.
    Restart Indesign CC.

  • FRM-40512 ORACLE ERROR UNABLE TO ISSUE SAVE POINT COMAND

    Dear Friends
    I am getting this FRM-99999 ERRORE 408 OCCURRED FRM-40655 SQL ERROR FORCED ROLLBACK CLEAR FROM AND RE-ENTER TRANACTION.
    FRM-40512 ORACLE ERROR UNABLE TO ISSUE SAVE POINT COMAND.
    I am calling the form using the following script :
    :global.command_line := 'C:\SALES\NEW_ITEMS.FMX' ;
    CALL_FORM(:global.command_line);
    go_block('COP_ORDER_DETAILS');
    go_record(:global.l_n_curr_rec2);
    :COP_ORDER_DETAILS.ITEM_CODE :=:GLOBAL.ITEM_CODE_VAR;
    :COP_ORDER_DETAILS.COLOR := :GLOBAL.COLOR_CODE ;
    :COP_ORDER_DETAILS.SHAPE_CODE := :GLOBAL.SHAPE_CODE ;
    :COP_ORDER_DETAILS.DELIVERY_QUANTITY := :GLOBAL.QTY ;
    :COP_ORDER_DETAILS.VOLUME := :GLOBAL.VOLUME;
    It works fine for one record, when I try to create another record by calling the called form it gives the above messages.
    Waiting for your valuable replay.
    Best regards
    Jamil

    Hi!
    May you try to open your form, compile all pl/sql (shift-ctrl-k) and compile the form (ctrl-t).
    Take a look at triggers like pre-insert, on-insert, post-insert and key-commit.
    What's happen there?
    I don't know, if the default username feature in 10g is still supported.
    So may the logon ( '/' ...) fails and for this the login screen os shown.
    Regards

  • Does a Database Action on a button override the DML Values?

    Greetings,
    I would like to know if a Database Action on a button (SQL Insert/SQL Update/SQL Delete) overrides the DML Valid Insert/Update/Delete Request Values? My button request is 'GENERATE', and obviously, it is not in the valid update request values. It does carry a SQL UPDATE Action, though the update doesn't seem to happen as the form is reloaded without any changes.
    Best regards,
    Mathieu

    Greetings,
    I definitely didn't look carefully enough. The update was happening all along, I just had forgotten to reset a flag on my page, which so happened to screw over with the session state. Thus, no matter the request of a button, if you specify a Database Action on it, it will override the DML Valid Request Values rule. That's good to know.
    Best regards,
    Mathieu

  • Going back to previous save point or that you didn't manually save?

    Hi,
    Is there a way to go back to a previous save point in a session or one that you didn't actually save manually? Like maybe it saves automatically every now and then and you can revert to it if need be?
    I'm thinking i seen something somewhere that logic's default for this type of thing is 10 points, although that could have been undo points i can't remember.
    Reason being is that for some reason all of my ultrabeat, bass and synths have reverted to their default settings. I have no idea why. Turned it off at end of working on it last night and everything was fine, just turned it back on this morning and it's like that.
    I do have another save point as a backup but it's very far removed from the current one but the settings haven't changed and it's all correct settings, so instead of reverting back is there a way to copy a whole project in its entirety over to another project? Tracks, settings, everything completely?
    I really hope i can get back to a previous save point. Anyone help?

    No matter, i've found it. Yes! I'm so pleased. You don't even know how much.
    Why i didn't see that backup folder before i have no idea... must be going blind

  • Save point restore

    Hi,
    How to restore savce point on load of the page.
    I have done it on button click,but i want to load savepoint on page load.
    Please let me know.
    Thanks.

    Hi,
    I am using the following code in the phaselistener and its getting called, but the resotring is not happening when this executes.
    The save point is present in the table.
    public void afterPhase(PhaseEvent e) {
    System.out.println("inside after phase");
    SavePointManager spmanager = ControllerContext.getInstance().getSavePointManager();
    SavePoint savepoint = spmanager.getSavePoint("a2b867bd-d8ab-4997-907e-a9f5d63d155a");
    System.out.println(savepoint.getAttributes());
    Is there any other configuration required for restoring other than this?
    ControllerContext.getSavePointManager().restoreSavePoint is not found
    Edited by: 811407 on Jan 10, 2011 4:29 AM

Maybe you are looking for