ListOfValues Cancel button creates memory leak

I believe one nuance of the listOfValues element (in an LOV page) gives rise to a memory leak. The examples and listOfValues documentation shows storing data needed by listOfValues events in the session. This is all fine and good if the user clicks on the "Select" button, as you get both a lovSelect and lovUpdate event to work with and clean out session data. But in the case of a user clicking the "Cancel" button, no event is fired, nor is a forward to another DataAction done. The window is simply closed. This strands all the data for the LOV (which could be quite sizable) in the user's session. You can't send this data on the request, because the LOV data must exist across several requests.
Am I completely missing something? How does one clean out a user's session when the Cancel button is clicked on a listOfValues component?
Brad

I am using JDeveloper 9.0.5.2. The restrictions of the project prevent using a newer version of JDeveloper. I am using ADF/Struts, and pure UIX (no JSPS).
The functionality I am speaking of is the standard behavior of the <listOfValues> component (lov for short). The lov component generates events for various behaviors (lovFilter, lovUpdate, loveSelect, etc.). It also completely encapsulates the Cancel and Select buttons, so you have no direct access to those. In order to manage an lov web page (presumably launched from an <lovInput> component on a previous page), the events need access to a certain collection of data (data for the table, max size, starting row, selection, validity, etc.). Because use of the lov page will result in potentially multiple submits, the request is not a good place to store this data, as the data needs to persist for the life of the lov page.
If you look at some of the lovInput/listOfValues examples on the OTN, you'll see that this data is persisted in the user's session. In and of itself, this is fine.
The problem is introduced by the fact that the lov's Cancel button (or window close) does not generate any events, and you don't have direct access to those controls to add an event of your own. When the cancel button is clicked, the window just closes, and in the words of the lov documentation "no other events occur."
This is very problematic -- your session is still stuffed full of data to support the lov. I am looking for a way to remove that data.
Frank -- in your post, you say:
"why can't you add an event to clean the session from the data?"
If you know how to add such an event -- one that fires when the Cancel button is clicked, please enlighten me. I would greatly appreciate it!
Thanks,
Brad

Similar Messages

  • Touchend event in javascript running in UIWebView creates memory leak

    I have an iPhone app that has a UIWebView on the main view.
    If I load a html page from the bundle that registers for the touchend event in javascript, each time the event is called it leaks memory.
    I can even have the function that is called by the event be empty and it still leaks.
    If I remove registering for the event then the leak never occurs.
    Any ideas on how to fix prevent the leak?
    Thanks!

    I just discovered the same problem as you.
    Did you ever find a solution to this problem?

  • Create memory snap shot in SRM 7

    Hi
    I have below two questions about the create memory snap shot tab
    Why create memory snap shot tab is provided in SRM 7, this tab appears when we create shopping cart, contract etc. ?
    How to access the created memory snap shot ?
    thanks in advance
    Regards

    Hi,
    Memory snap is used to analyze memories, see more information from sap help online document.
    http://help.sap.com/saphelp_srm70/helpdata/EN/42/f90d85e1de3ee4e10000000a1553f6/frameset.htm
    The visibility of the buttons "Create Memory Snapshot" and "System Info"
    is based on authorization object /SAPSRM/TL. The authorization object is
    not part of the standard SAP SRM PFCG roles. A normal user shall not have this authorization object
    because the authorization object belongs to the authorization class BC_C (Basis - Development Environment).
    Regards
    Lauren

  • Webservice memory leak

    Hello,
    I have noticed that calling webservice methods creates memory
    leaks. It seams that after you delete pending call, it still stays
    in the momory, so i thought its because webservice and pending call
    objects are referencing each other creating cross reference and
    preventing garbage collector from freeing the memory. I found 2
    references to webservice in pending call and 1 to pending call in
    webservice. Deleting them does not help.
    Here's code i'm using:
    import mx.services.*;
    var pendingCall:PendingCall;
    var service:WebService;
    //loads wsdl from [DRIVE]:/WSDL.xml
    service = new WebService("/WSDL.xml");
    function onKeyDown() {
    // call webservice method when space is pressed
    if (Key.getCode() == Key.SPACE){
    trace ("service.GetInfo();");
    //instead of calling remote method load xml, that is located
    in same folder.
    service.stub.activePort.GetInfo.endpointURI = "GetInfo.xml";
    pendingCall = service.GetInfo();
    pendingCall.onResult = function (){
    trace ("pendingCall.onResult");
    // delete, when "1" is pressed.
    if (Key.getCode() == 49){
    trace ("delete all");
    delete
    service.stub.activePort.GetInfo.currentlyActive.originalPromise;
    service.stub.activePort.GetInfo.currentlyActive.originalPromise =
    null;
    delete service.stub.callQueue[0];
    service.stub.callQueue[0] = null;
    delete
    service.myCall.currentlyActive.originalPromise.myCall.wsdlOperation.wsdl.serviceProxy.ser vice;
    service.myCall.currentlyActive.originalPromise.myCall.wsdlOperation.wsdl.serviceProxy.ser vice
    = null;
    delete
    pendingCall.myCall.wsdlOperation.wsdl.serviceProxy.service;
    pendingCall.myCall.wsdlOperation.wsdl.serviceProxy.service =
    null;
    delete pendingCall;
    pendingCall = null;
    Key.addListener(this);
    Thanks for any help!

    Hi,
    If you are using FL2 or FL3 then you might want to ensure that you delete the idMap property of each XML object.  There is a known memory leak with the xml object.
    delete myXml.idMap;
    delete myXml;
    Mark
    www.flashmobileblog.com

  • How do I create an input box with a cancel button that will end a loop in my script?

    I have been working on a script for my client and I am having trouble getting it to work properly. I stole most of the code from the PowerShell Tip of the Week "Creating a Custom Input Box". I also took someone's code for the Show-MessageBox function.
    I have slightly modified the original code with two parameters and an additional text box. The first field is for an e-mail address and the second is for an employee number.
    I need to know how I can get a Do Until loop to recognize when the cancel button is pushed and break the loop and effectively end the script. The work happens at the end but perhaps I need something added/modified in the InputBox function.
    I want the script to check to see if anything has been entered in the second text box. If empty it displays a message and calls the InputBox function again. Then if there is something I use elseif to check to see if it matches my RegEx (digits only). If
    it doesn't match it will loop and call the InputBox function again.
    This all works fine. The problem I am having is that I cannot cancel out of the form. I'd like the loop to continue until the second box matches my RegEx or Cancel is clicked. Clicking cancel doesn't break the loop. I need to know how I can stop the loop
    when cancel is pressed. I've seen Stack "Overflow: PowerShell Cancel Button Stop Script" but I don't think this will work in a loop.
    Any help would be awesome. As a note, I DO NOT want to use the VB Interaction stuff.
    function InputBox {
    param ($Name,$EN)
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    $objForm = New-Object System.Windows.Forms.Form
    $objForm.Text = "Data Entry Form"
    $objForm.Size = New-Object System.Drawing.Size(300,200)
    $objForm.StartPosition = "CenterScreen"
    $objForm.KeyPreview = $True
    $objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$x=$objTextBox.Text;$objForm.Close()}})
    $objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$objForm.Close()}})
    $OKButton = New-Object System.Windows.Forms.Button
    $OKButton.Location = New-Object System.Drawing.Size(75,120)
    $OKButton.Size = New-Object System.Drawing.Size(75,23)
    $OKButton.Text = "OK"
    $OKButton.Add_Click({$objForm.Close()})
    $objForm.Controls.Add($OKButton)
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,120)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text = "Cancel"
    $CancelButton.Add_Click({$objForm.Close()})
    $objForm.Controls.Add($CancelButton)
    $objLabel = New-Object System.Windows.Forms.Label
    $objLabel.Location = New-Object System.Drawing.Size(10,20)
    $objLabel.Size = New-Object System.Drawing.Size(280,20)
    $objLabel.Text = "Employee Email Address:"
    $objForm.Controls.Add($objLabel)
    $objTextBox = New-Object System.Windows.Forms.TextBox
    $objTextBox.Location = New-Object System.Drawing.Size(10,40)
    $objTextBox.Size = New-Object System.Drawing.Size(260,20)
    if ($Name) {
    $objTextBox.Text = $Name
    else {
    $objTextBox.Text = "@domain.com"
    $objLabel2 = New-Object System.Windows.Forms.Label
    $objLabel2.Location = New-Object System.Drawing.Size(10,70)
    $objLabel2.Size = New-Object System.Drawing.Size(280,20)
    $objLabel2.Text = "Employee Number:"
    $objForm.Controls.Add($objLabel2)
    $objTextBox2 = New-Object System.Windows.Forms.TextBox
    $objTextBox2.Location = New-Object System.Drawing.Size(10,90)
    $objTextBox2.Size = New-Object System.Drawing.Size(260,20)
    $objForm.Controls.Add($objTextBox)
    $objForm.Controls.Add($objTextBox2)
    $objForm.Topmost = $True
    $objForm.Add_Shown({$objForm.Activate()})
    [void] $objForm.ShowDialog()
    $Script:ButtonName = $objTextBox.Text
    $script:ButtonEN =$objTextBox2.Text
    $ButtonName; $ButtonEN
    Function Show-MessageBox{
    Param(
    [Parameter(Mandatory=$True)][Alias('M')][String]$Msg,
    [Parameter(Mandatory=$False)][Alias('T')][String]$Title = "",
    [Parameter(Mandatory=$False)][Alias('OC')][Switch]$OkCancel,
    [Parameter(Mandatory=$False)][Alias('OCI')][Switch]$AbortRetryIgnore,
    [Parameter(Mandatory=$False)][Alias('YNC')][Switch]$YesNoCancel,
    [Parameter(Mandatory=$False)][Alias('YN')][Switch]$YesNo,
    [Parameter(Mandatory=$False)][Alias('RC')][Switch]$RetryCancel,
    [Parameter(Mandatory=$False)][Alias('C')][Switch]$Critical,
    [Parameter(Mandatory=$False)][Alias('Q')][Switch]$Question,
    [Parameter(Mandatory=$False)][Alias('W')][Switch]$Warning,
    [Parameter(Mandatory=$False)][Alias('I')][Switch]$Informational)
    #Set Message Box Style
    IF($OkCancel){$Type = 1}
    Elseif($AbortRetryIgnore){$Type = 2}
    Elseif($YesNoCancel){$Type = 3}
    Elseif($YesNo){$Type = 4}
    Elseif($RetryCancel){$Type = 5}
    Else{$Type = 0}
    #Set Message box Icon
    If($Critical){$Icon = 16}
    ElseIf($Question){$Icon = 32}
    Elseif($Warning){$Icon = 48}
    Elseif($Informational){$Icon = 64}
    Else{$Icon = 0}
    #Loads the WinForm Assembly, Out-Null hides the message while loading.
    [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    #Display the message with input
    $Answer = [System.Windows.Forms.MessageBox]::Show($MSG , $TITLE, $Type, $Icon)
    #Return Answer
    Return $Answer
    $num = "^\d+$"
    do {
    if (!($ButtonEN)) {
    Show-MessageBox -Msg "You must enter a numeric value for the employee number." -Title "Employee Number Missing" -Critical
    InputBox -Name $ButtonName
    elseif ($ButtonEN -notmatch $num) {
    Show-MessageBox -Msg "The employee number must contain numbers only!" -Title "Non-numerical characters found" -Critical
    InputBox -Name $ButtonName
    until ( ($ButtonEN -match $num) -or (<this is where I want to be able to use the cancel button>)

    Here is a simple validation method.
    function New-InputBox{
    param(
    $EmailAddress='',
    $EmployeeNumber=''
    Add-Type -AssemblyName System.Windows.Forms
    $Form=New-Object System.Windows.Forms.Form
    $Form.Text='Data Entry Form'
    $Form.Size='300,200'
    $Form.StartPosition='CenterScreen'
    $OKButton=New-Object System.Windows.Forms.Button
    $OKButton.Location='75,120'
    $OKButton.Size='75,23'
    $OKButton.Text='OK'
    $OKButton.DialogResult='Ok'
    $OKButton.CausesValidation=$true
    $Form.Controls.Add($OKButton)
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,120)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text ='Cancel'
    $CancelButton.DialogResult='Cancel'
    $CancelButton.CausesValidation=$false
    $Form.Controls.Add($CancelButton)
    $Label1=New-Object System.Windows.Forms.Label
    $Label1.Location='10,20'
    $Label1.Size='280,20'
    $Label1.Text='Employee Email Address:'
    $Form.Controls.Add($Label1)
    $TextBox1=New-Object System.Windows.Forms.TextBox
    $TextBox1.Location='10,40'
    $TextBox1.Size='260,20'
    $textbox1.Name='EmailAddress'
    $textbox1.Text=$EmailAddress
    $Form.Controls.Add($textbox1)
    $Label2=New-Object System.Windows.Forms.Label
    $Label2.Location='10,70'
    $Label2.Size='280,20'
    $Label2.Text='Employee Number:'
    $Form.Controls.Add($Label2)
    $TextBox2=New-Object System.Windows.Forms.TextBox
    $TextBox2.Location='10,90'
    $TextBox2.Size='260,20'
    $TextBox2.Name='EmployeeNumber'
    $TextBox2.Text=$EmployeeNumber
    $Form.Controls.Add($TextBox2)
    $Form.AcceptButton=$OKButton
    $Form.CancelButton=$CancelButton
    $Form.Topmost = $True
    $form1_FormClosing=[System.Windows.Forms.FormClosingEventHandler]{
    if($Form.DialogResult -eq 'OK'){
    if($textbox1.Text -eq ''){
    [void][System.Windows.Forms.MessageBox]::Show('please enter an email address','Validation Error')
    $_.Cancel=$true
    }else{
    # Check empno is all digits
    if("$($TextBox2.Text)" -notmatch '^\d+$'){
    [void][System.Windows.Forms.MessageBox]::Show('please enter a number "999999"','Validation Error')
    $_.Cancel=$true
    $form.add_FormClosing($form1_FormClosing)
    $Form.Add_Shown({$Form.Activate()})
    if($Form.ShowDialog() -eq 'Ok'){
    # return the form contents
    $Form
    if($f=New-InputBox -EmailAddress [email protected]){
    'Email is:{0} for Employee:{1}' -f $f.Controls['EmailAddress'].Text,$f.Controls['EmployeeNumber'].Text
    }else{
    Write-Host 'From cancelled!' -ForegroundColor red
    ¯\_(ツ)_/¯

  • Blank row added after cancel button on create page

    Hi All,
    I have a create item page where I insert items into the item table in the database.
    On press of the cancel button on this create page, the control reaches a itemlist page with my old search criteria and result but with a new blank row added to it.
    Anybody know what's wrong?

    Sorry, I misunderstood your previous question. When the cancel button is pressed. I am using pageContext.forwardImmediately with parameters to forward back to my search page. Then in the search page controller I call the AM initQuery method to run the query. My initQuery method has the following code,
    StringBuffer whereClause = new StringBuffer(200);
    Vector parameters = new Vector(3);
    int clauseCount = 0;
    int bindCount = 0;
    setWhereClauseParams(null);
    if ((Program != null) && (!("".equals(Program.trim()))))
    whereClause.append("PROGRAM = :");
    whereClause.append(++bindCount);
    parameters.addElement(Program);
    clauseCount++;
    if ((PId != null) && (!("".equals(PId.trim()))))
    Number PIdNum = null;
    try
    PIdNum = new Number(PId);
    catch(Exception e)
    throw new OAException("AK", "FWK_TBX_INVALID_EMP_NUMBER");
    if (bindCount > 0)
    whereClause.append(" AND (P_ID = :");
    else
    whereClause.append(" (P_ID = :");
    whereClause.append(++bindCount);
    whereClause.append(")");
    parameters.addElement(PIdNum);
    clauseCount++;
    setWhereClause(whereClause.toString());
    if (bindCount > 0)
    Object[] params = new Object[bindCount];
    parameters.copyInto(params);
    setWhereClauseParams(params);
    executeQuery();

  • Creating a dialog box with OK and Cancel buttons without OADialogPage

    Hi Experts,
    i want to create a dialog box for Delete Confirmation means after clicking on delete it should pop up a small dialog box with OK/Cancel buttons
    and need code for the same to handle the buttons.
    i have created with OADialogPage but its showing in a complete page but i want to show those buttons in a small box.
    Plz help.
    THANKS IN ADVANCE.
    Thanks
    Raja.

    Hi,
    I have not tried using javascript in destination URI as suggested by Mukul.
    I have tried the below code for opening a page as dialog box.
    You can try it for your requirement by creating a dialog page of your own, say XXDialogPage (with OK and Cancel button)
    StringBuffer l_buffer = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    String url = "/OA_HTML/OA.jsp?page=/xx/oracle/apps/fnd/dialog/webui/OADialogPG";
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:500, height:500},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    In dialog page's controller, you can forward it to the page onc ethe user selects OK or Cancel.
    Pass the selected value back to the main page and further you can use it for deleting.
    Regards.

  • Memory leak when creating new thread.

    Hi,
    Each time i create a thread, it causes 8 bytes memory leak. The testing code is as below and you can see mem usage increasing in Windows Task Manager. But if i don't call ::OCIEnvCreate(), no memory leak.
    Memory validator shows the following call stack information:
    ........largest allocation 8 bytes at .......
    =>OraOCIEI10.dll ss_mem_thread_attach
    =>OraOCIEI10.dll sscoresetserverflag
    =>OraOCIEI10.dll slzgetevar
    =>ntdll.dll LdrInitializeThunk
    Anyone knows what is goiing on?
    /Yue
    #include <stdio.h>
    #include <windows.h>
    #include <process.h>
    #include <oci.h>
    static OCIEnv *env;
    static unsigned int counter = 0;
    unsigned __stdcall ThreadFunc(void* pArg)
    counter++;
    printf( "In %uth thread...\n", counter );
    Sleep(100);
    _endthreadex( 0 );
    return 0;
    int main( int argc, const char* argv[] )
         sword rc = ::OCIEnvCreate(&env, OCI_DEFAULT, NULL, NULL, NULL, NULL, 0, NULL );
         for(;;)
              HANDLE hThread;
              unsigned threadID;
              // Create the second thread.
              hThread = (HANDLE)_beginthreadex( NULL, 0, &ThreadFunc, NULL, 0, &threadID );
              WaitForSingleObject( hThread, INFINITE );
              // Destroy the thread object.
              CloseHandle( hThread );
         return 0;
    }

    Hi,
    I'm not suprised.
    OCI offers the feature OCIThreadKey that allow you to store a pointer within a thread context (without using OCIThread, just using natives threads).
    So OCI needs to catch thread creation to be able to register storage for its OCIThread key value and be able, once the thread is finished to call a callback with the pointer value associated with the thread....

  • MXML binding creating activation-object which seems to be memory leak

    We are profiling our application trying to cut down some memory leaks and I have some loitering objects that are puzzling me.  I have searched on the internet and have seen others with similar issues, but thought I'd post here to see if I am on the right track and if anything can be done about it.  In our _bindingsSetup method that is generated from the MXML:
        private function _ManageFavoritesDialogBulb_bindingsSetup():Array
            var result:Array = [];
            var binding:Binding;
            binding = new mx.binding.Binding(this,
                function():Class
                    return (ManageFavoritesDialogView);
                function(_sourceFunctionReturnValue:Class):void
                    _ManageFavoritesDialogBulb_View1.className = _sourceFunctionReturnValue;
                "_ManageFavoritesDialogBulb_View1.className");
            result[0] = binding;
            // ... more bindings
    While profiling the app, we have a more than a handful of GC roots that say result and binding are activation objects that are causing a whole bunch of stuff to be held onto.  Is this accurate?  If so, is there anything we can do about it other than not using MXML?
    Irv

    Thanks for the quick replies.  I went to your blog and watched the presentation you had on profiling (very nice), but my application is still having a memory leak I am having trouble locating.  We have found many and have cleaned them up, but this scenario is proving pesky.  I have a very simple scenario I am working with now.  I use a PopupManager and put a component in it.  I then tell the popupManager to removePopup.  For some reason, my component is being held onto (and all the references it is holding onto).  I am using Flex 3.5 but using FlashBuilder to profile.  It tells me on my component there are 0 paths to the GC root, and I have clicked on most of the items found in loitering (this is a create and destroy scenario) and they all say 0 paths.  Do you know of any known issues with PopupManager that I should be looking for?  The only thing showing a path to GC root are some of the bindings and activation objects.  (I am hoping it is not them as you pointed out)  I assume when it says 0 paths to GC root it means there are only circular references keeping it around correct?
    Thanks for any advice.
    Irv

  • Creating a customized Cancel Button

    I have a page with 2 regions.
    The 1st region has several text items and 2 buttons that are displayed conditionally.
    When the page first renders, Button A is displayed. The user then enters a value in one of the text items and clicks Button A. This displays the 2nd region. Button A then disappears and Button B appears.
    But I want the user to be able to start this process from scratch, i.e., have Button A appear on the form once again, with the form ready for him to enter another value in the text item and click Button A This is essentially just a Cancel button that returns the form back to its original state when the app was first entered.
    Can somebody please tell me how to do that?

    Hi Prohan
    You can add a button to a page that clears the cache of any page. What I think you are asking for is a button on page N that redirects to page N and also clears the cache on page N.
    To do this create a new button through the wizard and specify the page to re-direct to as the page you are adding the button to. When you've created the button you'll also have a branch created on this page for the button. Select the branch and in the Clear Cache section enter your page number.
    Alternatively, if you only want to clear some of the items on the page then create the button as above and leave the Clear Cache field empty. Instead enter the fields you want to clear in the 'Set these items' field and only enter comma's in the 'With these values' field. For example, to only clear fields 1, 2 and 3 enter
    Set these values - P1_ITEM1, P1_ITEM2, P1_ITEM3
    With these values - ,,
    Hope this helps.
    Sara
    http://www.apex-blog.com

  • T420S Synaptics Memory Leak + Volume buttons not working

    As title says, I'm having big problems with a memory leak from the touchpad driver. I've updated to the latest driver, but it still happens. This morning, the process was using 6.5 GB of ram! This is ridiculous.
    2nd issue is with the volume controls on the keyboard. They only work 50% of the time. I've reinstalled the driver, but it still happens. I have to manually change the volume in windows for the buttons to start working.
    Anyone know any solutions to these problems? Thanks

    I would be interested in knowing which process was using 6.5 GB of RAM, and how you measured the memory usage. I'm not seeing this on my T420s
    It sounds like the problems with the volume buttons are related to this problem: http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/Some-control-keys-don-t-work/td-p/558657 and possibly this one: http://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T400-Brightness-cannot-be-changed-after-sta... 
    It seems like, in recent years, several vexing and frustrating problems have been introduced into the programs in the Thinkvantage software suite which handle the onscreen displays and buttons. So far, Lenovo has ignored threads reporting these problems.

  • Error with "Open/Create/Replace File" function with cancel button

    I've attached a very simple VI that embodies what I want to do with my Open File function. I simply want to stop the rest of my program (theoretically encased in the Case Structure) from running if the user deigns not to specify a file location.
    However, if the Cancel button is clicked an error is produced before the rest of the program runs. If you ignore the error and continue, the "cancelled' variable is appropriately made true and the Case Structure runs properly. I simply want to remove the error message LabView gives me.
    Any ideas on why or how?
    Solved!
    Go to Solution.
    Attachments:
    Open file test.vi ‏34 KB

    The cancel button gives you error code 43 (if I remember correctly). After your file vi's, use the general error handler (GEH) to clear this error (and no other errors). Use
    [exception action]=Cancle Error on Match
    [exception code]=43
    type of dialog=no dialog
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Creating a 'CANCEL' button on Forms 5.0

    I would like to have a 'cancel' button right next to my 'save'
    button on a forms 5.0 application.
    The save button will:
    DO_KEY(COMMIT_FORM);
    I want the cancel button to rollback all changes to the last
    commit by that users. The problem is I don't know what code to
    place there...it seems if I use a SQL rollback that it clears
    the form...I guess this is because the button is associated with
    an anonymous datablock.
    Any help would be greatly appreciated,
    Also does anyone know of any forms templates that are around
    which may already have navigation and form control built-in....I
    would like to roll-out some templates to my team, but would like
    to get some ideas first.
    Thanks in advance...please help,
    Dennis
    P.S. I am, as you can tell by the question, just getting my feet
    wet with the Oracle Developer Toolset...can anyone recommend any
    web-resources like this discussion group that I should check
    out. I am already aware of comp.databases.oracle.tools Thanks.
    null

    Dennis,
    You cannot rollback once you have commit data unless you use
    POST (and savepoints) instead of Commit. I do not recommend
    going down this path as it can cause some major headaches down
    the road. I know it is nice to have feature but it adds some
    major time and headaches to the Project. For Templates, take a
    look at forms Demos for free stuff. For $$ stuff, Try Design
    Assist by Seeristic's. This is a product designed for Oracle
    Designer Generators but can be used by Developer only Teams. It
    has the best features I have seen. Also take a look at Peter
    Koletzke's Web Site. He, along with Paul Dorsey, has presented a
    paper on how to use templates to develop faster. I don't
    remember the address but you probably can find it if you do a
    Search on the web. (Paul's website is http://www.dulcian.com,
    Peter's Work Address is http://www.mvsn.com)
    Sunil
    daniel jensen (guest) wrote:
    : Dennis Hancock (guest) wrote:
    : : I would like to have a 'cancel' button right next to my
    'save'
    : : button on a forms 5.0 application.
    : : The save button will:
    : : DO_KEY(COMMIT_FORM);
    : : I want the cancel button to rollback all changes to the last
    : : commit by that users. The problem is I don't know what code
    : to
    : : place there...it seems if I use a SQL rollback that it
    clears
    : : the form...I guess this is because the button is associated
    : with
    : : an anonymous datablock.
    : : Any help would be greatly appreciated,
    : : Also does anyone know of any forms templates that are around
    : : which may already have navigation and form control built-
    : in....I
    : : would like to roll-out some templates to my team, but would
    : like
    : : to get some ideas first.
    : : Thanks in advance...please help,
    : : Dennis
    : : P.S. I am, as you can tell by the question, just getting my
    : feet
    : : wet with the Oracle Developer Toolset...can anyone recommend
    : any
    : : web-resources like this discussion group that I should check
    : : out. I am already aware of comp.databases.oracle.tools
    : Thanks.
    : If you look in Help, there is a built-in called POST with will
    : save changes without commiting the information to the
    database.
    : That might help you out.
    null

  • Memory Leak In DataService

    Hi All,
          I had posted this query to couple of other groups ..I am still struglling with this issue..Hope someone  will  help me out here
          I have  very basic application which uses  DataSerives over RTMP channel  to populate dataGrid , I have not used any  user defined component.
    This application has got LOAD data and Remove data  Button just to simulate the actual application
    What happens , when I click on LOAD data , It  loads the data from server(JBOSS) then I Remove all the data and force the GC to run
    If I continuously keep loading and removing the  data ,  memory goes up every time and after some times It reaches to threshold and  finally crashes the Browser.
    In actual application as soon as user logs in a dedicated DS destination is created..
        private function createDestination(destName:String):void{
                 var remoteService:RemoteObject = new RemoteObject("DestinationManager");
                 remoteService.addEventListener(ResultEvent.RESULT, resultHandler,false,0,true);
                 var operation:AbstractOperation = remoteService.getOperation("createDestination");
                 operation.send(destName);
                 var cs:ChannelSet = new ChannelSet();
                 var rtmpChannel:RTMPChannel = ServerConfig.getChannel("my-rtmp") as  RTMPChannel;
                 cs.addChannel(rtmpChannel);
                 tradeService = new DataService() ;
                 tradeService.destination=destName;
                 tradeService.channelSet = cs;  
    Now when user hits on Load data button to load the trade data ...
       public function loadData():void
             var remoteService:RemoteObject  = new RemoteObject("filterRemoteVO");
             var operation:AbstractOperation = remoteService.getOperation("loadData");
             tradeService.fill(tradeCollection);
             operation.send(rowData.text ,GUIID);
             tradeList.dataProvider = tradeCollection;
    Remove Data  hit I clean all the resource and released collection :-
          public  function  removeAll():void{
             if(tradeList.dataProvider){
                  tradeCollection.source = new Array();
                  tradeList.dataProvider.source = new Array();
                  tradeList.dataProvider = null;
                tradeService.release();
               tradeService.releaseCollection(tradeCollection);
              tradeService.channelSet.disconnectAll();
              tradeService.disconnect();
               tradeService.logout();
               System.gc();
    Except these 3 function I don't have any code which could cause memory leak.
    I m using
    LCDS 2.5
    Flex 3.0
    JBoss4.2
    Please see the mxml file below   , If  possible please have a look at it , I might  not be using dataSerice API correctly.
    I have been trying to solve this leak for last two week , I really need help from you guys.
    My client has already evaluating other contemporary technology because of this memory issue.
    I have also created scalled down war file which can be deployed on any  java application server.
    Any help will greatly be appreciated
    Regards,
    Dam
    ######################## MXML##########################
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
          creationComplete="init();" height="100%" width="100%"
         >
         <mx:Script >
         <![CDATA[
             import mx.containers.GridRow;
               import mx.utils.Base64Decoder;
             import mx.utils.StringUtil;
                import mx.events.CollectionEvent;
             import mx.formatters.Formatter;
             import mx.events.ResizeEvent;
             import mx.controls.DataGrid;
             import mx.effects.Fade;
             import mx.events.DataGridEvent;
             import mx.utils.ObjectUtil;
             import mx.events.ScrollEvent;
           import mx.formatters.DateFormatter;
           import mx.events.ListEvent;
           import mx.data.mxml.DataService;
           import mx.messaging.config.ServerConfig;
           import mx.messaging.channels.RTMPChannel;
           import mx.messaging.ChannelSet;
           import mx.rpc.AbstractOperation;
           import mx.rpc.remoting.RemoteObject;
           import mx.collections.ArrayCollection;
           import mx.controls.Alert;
           import mx.rpc.events.ResultEvent;
           import mx.messaging.messages.*;
           import mx.messaging.events.*;
           import mx.controls.Alert;
            private var GUIID:String;
            private var lastRollOverIndex:Number;
            public var tradeService:DataService=null;
            public var tradeCollection:ArrayCollection = new ArrayCollection();
           public var flag:Boolean = false;
            private function init():void {
               var guiId:String ="TEST";
                createDestination(GUIID);
            public function getData():void{
                 // memory.text =""+ ((System.totalMemory / 1024)/1024);
            public function releaseDataServices():void {
               //  tradeService.fill(null);
                    tradeService.release();
                   // tradeService.releaseCollection(tradeCollection);
                   tradeService.channelSet.disconnectAll();
                    tradeService.disconnect();
                    tradeService.logout();
                    //tradeService.dataStore = null;
                    /*Function for creating destination*/
              private function createDestination(destName:String):void{
                 var remoteService:RemoteObject = new RemoteObject("DestinationManager");
                 remoteService.addEventListener(ResultEvent.RESULT, resultHandler,false,0,true);
                 var operation:AbstractOperation = remoteService.getOperation("createDestination");
                 operation.send(destName);
                 var cs:ChannelSet = new ChannelSet();
                 var rtmpChannel:RTMPChannel = ServerConfig.getChannel("my-rtmp") as RTMPChannel;
                 cs.addChannel(rtmpChannel);
                 tradeService = new DataService() ;
                 tradeService.destination=destName;
                 tradeService.channelSet = cs;  
             //This function calls dataservice fill method depending on wheather destination is created or not
            private function resultHandler(event:ResultEvent):void{
               //call data service as destination is created successfully
                var status:Boolean = event.result as Boolean
               // Alert.show("status="+status);
                if(status){
                 getData();
               else{
                   //TODO report error to MATS app  
          public  function  removeAll():void{
             if(tradeList.dataProvider){
                  tradeCollection.source = new Array();
                  tradeList.dataProvider.source = new Array();
                  tradeList.dataProvider = null;
                tradeService.release();
               // tradeService.releaseCollection(tradeCollection);
              tradeService.channelSet.disconnectAll();
              tradeService.disconnect();
               tradeService.logout();
               System.gc();
           public function loadData():void
             var remoteService:RemoteObject  = new RemoteObject("filterRemoteVO");
             var operation:AbstractOperation = remoteService.getOperation("loadData");
             tradeService.fill(tradeCollection);
             operation.send(rowData.text ,GUIID);
             tradeList.dataProvider = tradeCollection;
       ]]>
    </mx:Script>
          <mx:DataGrid   id="tradeList"
                 initialize="tradeList.dataProvider = tradeCollection" horizontalScrollPolicy="auto"
                   height="659" x="0" y="84">
                <mx:columns>
                     <mx:DataGridColumn  headerText="Security Description" dataField="securityDesc"
                      />
                     <mx:DataGridColumn  headerText="B/S" dataField="transactionType"
                     />
                     <mx:DataGridColumn  headerText="Amount" dataField="amount"
                     />
                     <mx:DataGridColumn  headerText="Price Text" dataField="priceText"
                     />
                     <mx:DataGridColumn  headerText="Counterparty" dataField="counterParty"
                     />
                     <mx:DataGridColumn  headerText="Trade Date" dataField="tradeDate"
                     />
                     <mx:DataGridColumn  headerText="Settle Date" dataField="settleDate"
                     />
                     <mx:DataGridColumn  headerText="Trade Status" dataField="tradeStatusId"
                     />
                     <mx:DataGridColumn  headerText="Trader" dataField="trader"
                     />
                     <mx:DataGridColumn  headerText="Salesperson" dataField="salesperson"
                     />
                     <mx:DataGridColumn  headerText="Ticket Number" dataField="tradeNumber"
                     />
                     <mx:DataGridColumn  headerText="Entry Date" dataField="tradeTime"
                     />
                     <mx:DataGridColumn  headerText="Cancel Date" dataField="cancelDate"
                     />
                     <mx:DataGridColumn  headerText="Cancel Time" dataField="cancelTime"
                     />
                 </mx:columns>
              </mx:DataGrid >
             <mx:Grid x="149" y="23" width="995">
                     <mx:GridRow width="100%" height="100%">
                                <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Enter No of obejcts"   width="111"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput name="row" id="rowData"   width="97"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Button  label="Load Data" click='loadData()'/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Button  label="removeAll" click='removeAll()'/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Total Memory"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput text="Total Memory" id="memory"   width="97"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:Label text="Grid Row Count"/>
                             </mx:GridItem>
                             <mx:GridItem width="100%" height="100%">
                                     <mx:TextInput name="GridRowCountN" id="GridRowCount"   width="97"/>
                             </mx:GridItem>
                     </mx:GridRow>
             </mx:Grid>
    </mx:Application>

    Hi Natasha,
    Sorry for late reply.
          I tried your suggestion but It did not help to release memory. Actully,this app contains only one event handler which is for remote method call , I dont think this could cause any memory leak.
    Profiling session reveals that It is the issue of DataService class.I dont know How do I convince  Adobe to investigate this issue.
    Regards,
    Dharmendra

  • Memory leak in JSpinner implementation (maybe others?)

    Hi,
    I am developing an application using Java and Swing, and have run into some problems with memory leaks. After examining the source code and making an example program (provided below), I can only come to the conclusion that there is a bug in the implementation of JSpinner in Sun Java 1.6.0_03.
    If one uses a custom model with the JSpinner, it attaches itself as a listener to the model. However, it never removes the listening connection, even if the model is changed. This causes the JSpinner to be kept in memory as long as the model exists, even if all other references to the component have been removed.
    An example program is available at http://eddie.dy.fi/~sampo/ModelTest.java . It is a simple swing program that has the JSpinner and two buttons, the first of which writes to stdout the listeners of the original model and the second changes the spinner model to a newly-created model. A sample output is below:
    Running on 1.6.0_03 from Sun Microsystems Inc.
    Listeners before connecting to JSpinner:
      Model value is 0, 0 listeners connected:
    Listeners after connecting to JSpinner:
      Model value is 0, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971ad
    Listeners now:
      Model value is 8, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971ad
    Changing spinner model.
    Listeners now:
      Model value is 8, 2 listeners connected:
      1: interface javax.swing.event.ChangeListener
      2: javax.swing.JSpinner$ModelListener@9971adThis shows that even though the model of the JSpinner has been changed, it still listens to the original model. I haven't looked at other components whether they retain connections to the old models as well.
    In my case, I have an adaptor-model which provides a SpinnerModel interface to the actual data. The adaptor is implemented so that it listens to the underlying model only when it itself is being listened to. If the JComponents using the model were to remove the listening connections, it, too, would be automatically garbage-collected. However, since JSpinner does not remove the connections, the adaptor also continues to listen to the underlying model, and neither can be garbage-collected.
    All in all, the listener-connections seem to be a very easy place to make memory leaks in Java and especially in Swing. However, as I see it, it would be a simple matter to make everything work automatically with one simple rule: Listen to the models only when necessary.
    If a component is hidden (or alternatively has no contact to a parent JFrame or equivalent), it does not need to listen to the model and should remove the connections. When the component is again set visible (or connected to a frame) it can re-add the connections and re-read the current model values just as it does when initializing the component. Similarly, any adaptor-models should listen to the underlying model only when it itself is being listened to.
    If the components were implemented in this way, one could simply remove a component from the frame and throw it away, and automatically any listener-connections will be removed and it can be garbage-collected. Similarly any adaptor-models are collected when they are no longer in use.
    Changing the API implementation in this way would not require any changes to applications, as the only thing that changes are the listener-connections. Currently used separate connection-removing methods should still work, though they would be unnecessary any more. The API would look exactly the same from the view of an application programmer, only that she would not need to care about remnant listening connections. (As far as I can tell, the current API specification would allow the API to be implemented as described above, but it should of course require it to be implemented in such a way.)
    Am I missing something, or is there some valid reason why the API is not implemented like this?
    PS. I'm new to these forums, so if there is a better place to post these reports, please tell me. Thanks.

    Another cognition: It's the following code, that causes the memory to be accumulated:
    obj = m_orb.resolve_initial_references("NameService");
    ctx = NamingContextExtHelper.narrow(obj);For the first 4 calls to this code the memory usage of the nameservice is unchanged. From the 5th to the 8th call, it's increased by approx. 10KB per call. And thenceforward (beginning with the 9th call) it's increasing by approx. 10MB.
    What's going wrong here?

Maybe you are looking for