How to wash out an AM instance variable at the end of user session (logout)

We have a need to create AM instance variables to hold some session level data, which is too complex to be held in a transient VO.
What we observed is that the instance variable is not washed out at the end of the user session (i.e logout).
I think since the AM instance is not really destroyed but only release back to the pool the instance variable content persists and is carried over to the next session that access the AM instance.
What method in AM can be overridden to wash out this instance variable.
At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
It would be better to reset it when the AM is released back to the pool.
Any pointers would be helpful.

At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
Note that prepareSession() is also invoked after AM activation so this can(and probaly will) reset your variable inside existing session.
If you don't need to keep variable value between AM activations/passivations, you can use userData, for example:
this.getSession().getUserData().put("someKey", value);
UserData values are lost after AM passivation (by default).
If you need to keep UserData variable value for lifetime of user session, then you can override passivateState() and activateState() as in this sample:
Application State Management
Dario

Similar Messages

  • How to find out all active instances in a syste

    How to find out all active instances in a system

    Go to your basis team and ask them, as far as i know there is no other way then suggested in the other answer, but that is not a complete picture, And that is as designed, why should one want to be able to find out, the basis consultant will tell you!

  • How doi print Any variable at the end of page in ALV report?

    Hi,
    Anyone can tell me that How do i print Any variable at the end of page in ALV report?
    Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.

    Hi,
    Go through these links
    Thread in sdn regarding FOOTER IN ALV
    [ALV  FOOTER;
    Wiki in sdn regarding HEADER AND FOOTER IN ALV
    [https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
    Header and Footer in ALV
    [http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
    Hope this helps.
    Thank you,
    Pavan.

  • How to sort out error downloading perpetual license of the CS6 Design Standard for MAC: JRun Servlet Error 413  Header Length too Large?

    How to sort out error downloading perpetual license of the CS6 Design Standard for MAC: JRun Servlet Error 413  Header Length too Large?
    Just bought the perpetual license online - student-teacher version. Received email confirming my eligibility and followed all instructions to a 't', but still got this 413 error message, and cannot continue.
    Would anyone be able to help me?
    Or how can I get in touch with Adobe themselves?
    How do you get to the chat? I bought it with their help, but cannot remember how to get there again. Took me ages to find the chat.
    Cheers!!! Thanks a million! Any help is welcome!!!!

    Make sure you have cookies enabled and clear your browser's cache before you try downloading.  If it continues to present that error try using a different browser.
    As far as getting to a chat link goes, it can be hit or miss...  Start Here  If after selecting relevant responses you are unable to find a solution, choose "Still need help? Contact us." and the chat contact option.

  • How to find out query name using Elements of the query builder.

    Hi SDNers,
    how to find out query name using Elements of the query .
    thanks,
    satyaa

    Hi,
    For having a look at the relation between BEx tables,check the link below:
    http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
    -Vikram

  • Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    Using Flach CS4 and action script 2.0 how do I advance to a specific frame of the main timeline when a movie clip instance come to the end of its timeline?

    code on the last frame of your movieclip instance:
    _root.gotoAndStop('whatever_frame');  // will work unless this swf is loaded into another swf.  in that situation, you should use a relative path to the main timeline (eg,  _parent or _parent._parent etc).

  • How do you get word count to print at the end of a document in Pages?

    How do you get word count to print at the end of a document in Pages?

    Pages v5 does not provide a user assignable word count variable. With some AppleScript, and a paste operation from the clipboard, you can have locale punctuated word count in this format: 7,803 — anywhere in your document. The following AppleScript works with Pages '09 v4.3 through Pages v5.5.2 on Yosemite.
    I would suggest that you copy paste the following AppleScript into your [Apple] Script Editor and save it (suggestion) wordcnt.applescript. Then, follow this with an option+Save As… and this time set the File format to Script Bundle, or Application with hidden extension — saved to your Desktop. Provided you have a Pages document open, you are then a double-click from the ability to paste your current word count into Pages.
    Note: If you have Pages word count display enabled, it will automatically count your pasted value as another word which initially may deceive on true word count at the time the script was run.
    AppleScript
    --- copy below this line ---
    property locale : "en_US.UTF-8" -- In Terminal, use the locale command to see yours
    if not ApplicationIsRunning("Pages") then
         display dialog "Pages must be running to use this utility."
         return quit
    end if
    tell application "Pages"
        tell body text of front document
            set wordCnt to count words
            -- Don't want punctuated numbers? Remove the single quote from printf format
            set the clipboard to (do shell script "export LC_ALL=" & locale & "; printf \"%'d\" " & wordCnt)
        end tell
    end tell
    on ApplicationIsRunning(appName)
         tell application "System Events" to set appNameIsRunning to exists (processes where name is appName)
         return appNameIsRunning
    end ApplicationIsRunning

  • When I attach a file to outgoing mail it shows up in the body of the e-mail. How can i make it only show up at the end or elsewhere?

    When I attach a file to outgoing mail it shows up in the body of the e-mail. How can i make it only show up at the end or elsewhere?

    Edit > Attachments > Insert Attachments at End of Message. If a new message is the active window, the option applies only to that message. If you don't have a new message open, then the option becomes Always Insert Attachments at End of Message.

  • I am trying to sync my Ipad 2 to my Itunes account on my laptop.  It will only sync my purchased music.  All of my personal CD music that is on the account is grayed out with a red circle at the end.  Please help.

    I am trying to sync my Ipad 2 to my Itunes account on my laptop.  It will only sync my purchased music.  All of my personal CD music that is on the account is grayed out with a red circle at the end.  Please help.

    Did you select all of the music to sync by clicking on the playlists or albums or whatever you use in iTunes - in order for them to sync? Or did you click on Entire Music Library if you want all of your music on the iPad?

  • HT1551 How do I shut off my Apple TV at the end of use. It asks me if I want to sign off but I assume that if I do this I will have to re enter my network info as well as pass word when I use Apple TV again

    How do I shut off my Apple TV at the end of use. It asks me if I want to sign off but I assume that if I do this I will have to re enter my network info as well as pass word when I use Apple TV again

    Just leave it be and after a period of inactivity it'll automatically shut off, press a button the remote and it'll wake up.

  • How to find out whether I am working on the right instance?

    Hi All
    I want to find out from Oracle Apps i.e., Front end the following:
    Whether the instance I am working on currently is the same one or restored from a backup. I will not be able to find out the difference immediately as the changes between the current instance and backup instance are very few and dispersed but at the same time critical to the system.
    How can I find out from the front end whether the instance is same as I was working yesterday assuming I am the only user?
    Thanks in Advance for any help.
    Regards
    Rahman

    Hi,
    as the changes between the current instance and backup instance are very few and dispersed but at the same time critical to the system.I believe there is no way to find out unless you check and see those changes (before/after the restore).
    Regards,
    Hussein

  • How to find out which jobs are connected to the user

    Hello, i have a question, but i was unable to find the answer. The problem is that our internal consultant left the company, and there are certain jobs that run under his account. We want now to switch this jobs to other accounts. The problem we are facing is how to find out what jobs, or job steps are connected with his account, so we can safely demote his account, so that no other jobs will be run under his account. Thank you very much
    Sincerely,
    Luka Prijic

    the only reliable way to do this is by scanning table TBTCP using the person's userID in field AUTHCKNAM and filtering by job statuses: scheduled, released, ready and active (sorry I can't remember the code#'s off top of my head, something like P=scheduled, S=scheduled...you have to look it up).   When you search SM37 it only permits you to scan by the userID who created the job, but it won't tell you if a different userID is defined in a job step.  That's why you need to scan TBTCP.  Don't forget that you should also check for a user's open Workflow items before deletion.
    I noticed some posts in this forum that suggest a userID should never be deleted, only locked, added to a special user group, and all role assignments removed.  However I've never worked somewhere that does this.

  • ADF table: How to find out which rows were modified by the user

    Hi,
    I am using ADF table to display data that can be modified by the user (ReadOnly = false in the input text). I need to find out which rows were modified by the user, and only update (persist) those rows in the database.
    Is there an easy way to find out which rows were modified by the user.
    I am NOT particularly concerned with which columns were modified as I would update the entire row (if any data in that row is modified).
    I am using Oracle JDeveloper version 11.1.1.3.
    Thanks,
    Ash K

    Thanks Timo.
    I am using ADF Data Control (which are created from Web Service proxy) to display/update the data.
    In the backing bean, the operation that is invoked at the time persisting data is as follows:
    public void commitOperation {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("operationA");
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("someIterator");
    for(int i=0; i<dciter.getViewObject().getEstimatedRowCount(); i++)
    Row row=dciter.getRowAtRangeIndex(i);
    SomeObject someObject= new SomeObject ();
    someObject.setAttr1(row.getAttribute("Attrbute1").toString());
    someObject.setAttr2(row.getAttribute("Attribute2").toString());
    objectList.add(someObject);
    operationBinding.getParamsMap().put("param1", objectList);
    ResultObject result = (ResultObject) operationBinding.execute();
    Inside the for loop (or any other place in the backing bean), I would like to figure out if the row was modified by the user. Please let me know if how to get that. If ADF provides this automatically, that would be GREAT.
    Thanks,
    Ash K

  • How can I find out which DLL version is on the end-user's computer?

    I'm working on an installer program and I was wondering how I can find out what version of a DLL is on the end-user's computer, furthermore I would also like to find out if the file is locked in memory. Is there a way to do this? I figured natively there wouldn't be but does anyone know of a C++ wrapper or so?

    I'm not aware of any way of seeing the list. Have you had other computer's in the past and/or updated the OS on your current computers without first deauthorising them ? Deauthorising all (which you can only do once every 12 months) won't remove any content from those computers, it just means that you won't be able to use the account's content on a particular computer until you've reauthorised that computer

  • How to deploy a VO Bind variable to get value from user session....

    Hello everbody...
    A JSF Page has a table based on VO with two parameters. One of this parameters I will pass by operation ExecuteWithParams.
    but the other parameter I need to pass a value from User session.
    Is that possible? How would I do that? I´m using jdev10.1.3
    Thankyou...

    When you created a binding for executeWithParams in your pageDef, the action binding should have had NamedData elements for each of the parameters. These would have been assigned values from a variableIterator up in the executables section. The parameter that gets its value from user input should be left alone. For the parameter that gets its value from the user session, change the EL expression that defines its NDValue attribute so that it references the session information that you want to use. This can be a sessionScope variable that you set earlier in the session, as Frank suggests, a property of a managed bean in session scope, or some other variable.

Maybe you are looking for

  • External display resolution

    I have Dell up2414q monitor which is capable of displaying up to 3840 x 2160. But when I connect my 11-inch Macbook Air (the latest 2014 model), which is capable of 2560 x 1600, shows only 1920 x 1080. This is the highest resolution listed in display

  • Third party DAQ units compatibility?

    ?Hello,              I am curious to know that can we use any third party DAQ units rather than NI products. For example, NI USB 6008 or some other device from NI. AT the same time, If I choose any third party device for DAQ then can I use DAQ assist

  • Subordinate per domain?

    5000-10000 users/devices.  5 domains in same forest.  root offline CA required. Windows 2012 CA.  Windows 7 clients. Any advantage or disadvantage of having a subordinate CA in each domain? Thanks

  • Itunes store in china

    there seems to be a problem with itunes store in china.. i cannot log onto itunes store in china... is there anyone with the same issue? and when can we hope to get it working well again?

  • Time Management (BW-HR Report)

    Hi, My requirment is to develop a BW Report on Following HR Information. Organisational Unit Date Selection Absence Type Staff ID Staff Name Absence Start Date Absence End Date Hours of Absence Days of Absence Can ant one advise he how can i achieve