How to do something before the user session expires

Hi,
I need to do some extra cleanup (delete some rows from database, etc) before the session of a user expires.
I tried to do it with Phase Listeners, but haven't figured out how to put it on the session, I guess I need a kind of Listener.

Can implement ServletContextListener to fire off events on context destroy.
example.
   public class LifeCycleServletContextListener
      implements ServletContextListener {
      public LifeCycleServletContextListener() {
      public void contextInitialized(
        ServletContextEvent sce) {
         System.out.println(
           "LifeCycleServletContextListener:
               contextInitialized");
      public void contextDestroyed(
        ServletContextEvent sce) {
         System.out.println(
           "LifeCycleServletContextListener:
               contextDestroyed");
   }

Similar Messages

  • How to do something before the interface is seen?

        I want to use Lingo to do something before everything is seen (before the first frame, and before the exe interface appears). But I don't know how to realize.
        For example, I want to run the code:
            alert("test begin!")
    before everything is seen. I have tried to write the statement in startMovie(), prepareMovie(), prepareFrame(), and beginSprite(), and all failed. In all case, the alert message is popped after the interface appears.
        How to do? Thanks!

    It depends on exactly what you want to do. In some cases you might have to set your movie to open with a stage size of 1 x 1, or completely off screen, before you do what you want and resize/move it. In other situations the lingo.ini file can be used to execute the #startup handler. However, you should only rely on this handler to set global variables - some objects, like cast members, sprites, etc. aren't available. Refer to the existing lingo.ini file in your Director\Configuration\  folder

  • How to trigger a BAPI where user session expires

    Is there a way to write custom code (server side) when the user -
    1. Logs off
    2. Session Times out
    3. Browser crashes?
    Any standard EPCF event/code that I can use?

    I would start with javascript and using the "onExit" etc. events. You can use this to trigger an iview, which calls the BAPI.
    For browser crashes, the only way (to my knowledge) is to write (very tedious) a "session watch" job, that watches for timed out sessions that are not detected by the browser.

  • Numbers does not open with the main user after installing mountain lion. It works flawlessly when I use the second account on my mac. What got corrupted in the admin-account, something in the user-library? How can I fix it? I´m kinda desperate...

    Numbers does not open with the main user after installing mountain lion. It works flawlessly when I use the second account on my mac. What got corrupted in the admin-account, something in the user-library? How can I fix it? I´m kinda desperate... (the same happens with the other iWork-Apps!)
    Looking forward to hearing from somebody with a littlemore expertise than me, Chris

    you can remove preferences files by navigating to the Preferences folder for your user as follows:
    0) Quit ALL iWork apps (Keynote, Pages and Numbers)
    1) from the Finder select the menu item "Go > Go To Folder…".  This will bring up a dialog:
    2) enter the path "~/Library/Preferences" (no double quotes)
    3) find the files:
    com.apple.iWork.Keynote.plist
    com.apple.iWork.Numbers.plist
    com.apple.iWork.Pages.plist
    and move these to the trash.  I would NOT empty until later.
    4) restart Numbers

  • How to change the max number of the user session?

    Hello,
      The max number of the user session of my system is 6,I want to change it,how should I do?

    Hi Begue,
    This can be done by changing the value of profile paramter rdisp/max_alt_modes. Currently its value in your system must have been set to 6. You can check the value through transaction RZ11. To change it use transaction RZ10.
    For knowing the details of changing values in RZ11 please visit :
    http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a6247505211d189550000e829fbbd/frameset.htm
    After making the changes please restart SAP.
    Please award points if the issue got solved.
    With Regards.
    Ruchit.

  • How to keep track of the users who are all currently logged in

    Hi All,
    I have basic knowledge of Session and Servlets. I am wondering how to keep track of the users who are all currently logged in. There should be some way of achieving it.
    I thought of it and come up with having an Application variable that hold it when ever a user successfully logged in.
    Thanks in advance for any reply.

    You can do this by keeping data in a static veriable in a some class of yours. The variable will need to be a collection.
    Whenever a user loogs in to the site a servlet/jsp should put the users information in to the collection and when logs off or when the session expires the entry should be take off.
    You can achive this by storing the velues in a some sort of a week collection where the entries are automaticaly removed when all the other refferences to the entry goes out of scope.
    You might need to read bit about java.lang.ref package and WeekReference
    Or you can make the entry in the collection contain the last time that the user visited any of the pages and a thread can run time to time and clean up the older entries which have timed out

  • Java API Failed to authenticate the user session with LDAP

    I have created a Java class that uses the MDM Java Api's it works fine on our Development environment where the MDM server uses its own built in authentication, but when I moved it to our QA environment where MDM use LDAP for authentication its failed with a  'Failed to authenticate the user session'.  Has anyone seen this before?

    hi Dan,
    The java class which u have created that suppose to works fine on MDM server because to execute that program there are no requirement of such protocols, the problem u will face while exporting those program to an client machine
    LDAP(Lightweight Directory Access protocol) connector communicates with the SAP system using RFC and with the directory server using these standard communication protocol.
    so try to select the protocol such that it should help in making connection between the server,direcotryserver and the client machine through which u can execute u r java class using java Api's.
    i hope this will give u an idea to through ur problem.
    regards,
    swapnil

  • MTS, Killing the user session?

    My db is using MTS connection, while i kill the user session by using alter system kill session, the ever killed process goes to Pseudo status....even i can't kill from unix level because it uses dispatchers...
    is there any way i kill the user processes in MTS, with out going to pseduo status

    Hi,
    AS ORACLE SAID,
    If an active session cannot be interrupted (it is performing network I/O or rolling
    back a transaction), the session cannot be terminated until the operation completes.
    In this case, the session holds all resources until it is terminated. Additionally, the
    session that issues the ALTER SYSTEM statement to terminate a session waits up to
    60 seconds for the session to be terminated. If the operation that cannot be
    interrupted continues past one minute, the issuer of the ALTER SYSTEM statement
    receives a message indicating that the session has been "marked" to be terminated.
    A session marked to be terminated is indicated in V$SESSION with a status of
    KILLED and a server that is something other than PSEUDO.

  • Do something before the PDF be openned

    I wanna do something before the PDF be openned.
    Can I complete it? How?

    Are you using the standard PDF methods for encryption?  If so, then you want
    to write a custom security handler and that handles encryption, decryption
    and rights management.
    If you are using your own encryption format - so that the PDF is no longer a
    real PDF - then you want the AVConversion APIs.  However, that won't help
    you with the rights management.  You will need to do a lot of overriding and
    hooking in order to catch those.

  • I've accidentally deleted something in the Users & Groups pane and now many of my programs do not run at all!

    Hello all, I'm hoping you can help me as I have accidentally deleted something in the Users and Groups pane and I don't know how I can restore it. Because of this, items on my desktop have disappeared, my trackpad behaves much differently, and many of the programs are unresponsive. Should I consider wiping it clean (I do not have any start up discs at my disposal) and is there a way to keep my operating system (Mavericks 10.9.2)?

    Try to boot your MacBook Pro from recovery mode and if you have TimeMachine backup, you can restore most of stuffs
    OS X: About OS X Recovery

  • How can i get all the users from weblogic server?

    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

    BTW, i use weblogic platform 8.1
    "Daniel" <[email protected]> дÈëÓʼþ
    news:[email protected]..
    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

  • How will I block/restrict the user to change the payment term in FBL5N?

    Hi All,
    How will I block/restrict the user to change the payment term in FBL5N????
    I have tried on following objects:
    F_BKPF_BLA
    F_BKPF_BUK
    F_BKPF_GSB
    F_BKPF_KOA
    F_IT_ALV
    F_KNA1_BED
    F_KNA1_BUK
    F_LFA1_BUK
    S_ALV_LAYO
    But, not succeeded.
    =>Actually user runs FBL5N, double click on a record then click on Change icon.
    =>Change Payment Term.
    Please reply ASAP. Point will be awarded.
    With Best Regards
    Dharmendra

    Hi Dharmendra,
    Please set an authorization trace in ST01 and then ask the user to execute the transaction and the steps on the same application server as the o ne on which the trace has been set (valid in case we are talking about mutiple application servers for same <SID>). After this is done switch off the trace,list it and fill all the authorization objects. That might give you the perfect idea.
    Regards.
    Ruchit.

  • Is it possible to start JSON Service specific to the user session?

    Is it possible to make JSON service to start different sessions of BusinessLogic Code in short - Is it possible to start JSON Service specific to the user session?
    Here is what I'm trying to do. I have a created a Configuration Model which contains the business logic. I want to start this model as a JSON service, and the user will interact with this model via mobile App developed using ADF Mobile. The JSON sevice has two calls
    /startConfiguration/{model_id}
    /getConfiguration
    Both of them return the string that indicates the BusinessModel being started by JSON service.
    When invoked " /startConfiguration/{model_id} " from two different browsers (Chrome - started first, FF - started second) for the same model_id (simulating the scenario of two user accessing same model), it did returned two different 'configuration' object strings, indicating that each call started its own Configuration.
    However, when I validated that the session started is user specific by calling "/getConfiguration"  it return same 'configuration object string - which is the second call from FF. Thus indicating that I cannot have JSON service tied individually to each user session. 
    My goal is to have JSON service specific to each user session. Is this possible?

    Hi,
    what is a JSON service? JSON is an object notation used with REST services. So I assume you have a REST services that returns JSON and you now want to obtain the same identifier for a specific input string? REST services - like all Web Services - are stateless and if you want to associate a request with a specific context then you need to pass a token or similar with the request so the context can be re-established. In your case I would have a look at the code mapped to startConfiguration/{model_id} to verify if the method checks for an existing configuration with the provided ID. Chances are that its the code returning the wrong ID. In general I would go with a token approach.
    Frank

  • My new nano keeps going into sleep mode every copy of minutes while music is playing.  I can't figure out how to stop this.  The user guide isn't too helpful.  Any ideas?

    My new nano keeps going into sleep mode every copy of minutes while music is playing.  I can't figure out how to stop this.  The user guide isn't too helpful.  Any ideas?

    This is usually a sign that your iPod's headphones are not plugged in all the way.  Make sure that you cannot see any of the silver still showing from the headphone's plug.  You should hear a sort of popping/clicking noise when inserting the headphones letting you know that they have been fully seated.
    B-rock

  • How to create and see the user interface of helloworld sample??

    hello friends,
    i have deployed the hello world sample
    now i want to know how to create and see the user interface of hello world sample.
    thanks and regards..

    If you go to bpel console host:port/BPELConsole (in a dev install, localhost:9700), click on your process, we will generate, based on the describing wsdl a UI for you ..
    hth clemens

Maybe you are looking for

  • I can't switch my phone on!

    I dropped my phone, no apparent damage to actual phone as it's kept in a case.  I haven't been able to switch it on since, no sign of power or anything! Help!

  • Download Drivers Satellite Pro A120-144

    My question will reveal my inexperience and caution. Please accept my apologies for this. I have accessed a Toshiba page offering drivers for downloading. http://uk.computers.toshiba-europe.com/innovation/jsp/supportMyProduct.do?service=UK I have che

  • Oracle client for Itanium2 CPU (Montvale)

    We found an oracle client software which works on Montesito CPU (previous Itanium2 CPU). But this version of the software does not support Windows Server 2008 Itanium Edition. We need oracle Client which works on Intel Itanium2 (Montvale) CPU and Win

  • Essbase Server Problem

    Installation and configuration with SQL Server passed without any problem, now when i am trying to add my Essbase Server it this throwing me this error..... Network error[10061]: Unable to connect to [m/c no:1423] The client timed out waiting to conn

  • Acrobat 6 not installing in my windows 8.1

    I know I will be asked to buy newer versions but Iam quite happy with 6 pro and would like to stay with that. Can you guide me how can I stay with that on my new PC with windows 8.1?