Invalidate session with specific sessionId

Hi there,
Is it possible to invalidate session with specific sessionId?
Thanks.

Hello,
I have a system consisting of three different departments, each department has its own login page with different username and password.
from the same browser, all three administrators can log in successfully, during there login, one session is created with different attributes for each of them, if any one administrator logs out, I invalidate the session, which logs out the other two administrators.
Can I use session Id to log out on administrator while the other two can stay logs in?
If I am using the wrong approach all together, can anyone suggest an alternative please?
here is my code to create session:
// if correct username and password entered then create session
String financeAdminSess = adminUsername;
session.setAttribute("financeAdminSess", adminUsername);                                        
String redirectURL = "finance_admin_home.jsp";
response.sendRedirect(redirectURL);
and here is the code for loggin out:
// get session
String financeAdminSess=(String) session.getAttribute("financeAdminSess");
// remove session
session.removeAttribute("financeAdminSess<br />");
// invalidate session
session.invalidate();
Any suggestion would be much appreciated.
Thanks
Shaxo

Similar Messages

  • Monitoring Users session with specific profiles

    Hi,
    I created a specific profile that terminates a session with idle time 4 minutes. I would like to know how to monitoring which sessions are been disconnected by Oracle.
    Thanks in advance,

    enable auditing by using
    alter system set audit_trail = db scope=spfile
    and bounce
    Then issue audit connect
    The dba_audit_session view will have the reason why the process was disconnected.
    Sybrand Bakker
    Senior Oracle DBA

  • Invalidate session with weblogic.Admin

    Hi,
    I tried to invalidate sessions using weblogic.Admin using the command: java weblogic.Admin -url t3://localhost:8013 -username system -password *** GET -pretty -type ServletSessionRuntime. The output was:
    MBeanName: "R3:Location=PIA,Name=B0lYRDnVqlw1VzPZO1XszSFlIASW017b!1102341400731,ServerRuntime=PIA,Type=ServletSessionRuntime"
    CachingDisabled: true
    MainAttribute: [email protected]/ps
    Name: B0lYRDnVqlw1VzPZO1XszSFlIASW017b!1102341400731
    ObjectName: B0lYRDnVqlw1VzPZO1XszSFlIASW017b!1102341400731
    Parent: PIA
    Registered: true
    TimeLastAccessed: 1102341410448
    Type: ServletSessionRuntime
    Then tried to invalidate it using:
    java weblogic.Admin -url t3://localhost:8013 -username system -password *** INVOKE -mbean "R3:Location=PIA,Name=B0lYRDnVqlw1VzPZO1XszSFlIASW017b!1102341400731,ServerRuntime=PIA,Type=ServletSessionRuntime" -method INVALIDATE
    ANd the error message: bash: !1102341400731: event not found
    Do you know how to handle this? Or any other way to invalidate session from weblogic.Admin?
    WLS 8.1 SP1
    Regards
    Tomi

    Hello,
    I have a system consisting of three different departments, each department has its own login page with different username and password.
    from the same browser, all three administrators can log in successfully, during there login, one session is created with different attributes for each of them, if any one administrator logs out, I invalidate the session, which logs out the other two administrators.
    Can I use session Id to log out on administrator while the other two can stay logs in?
    If I am using the wrong approach all together, can anyone suggest an alternative please?
    here is my code to create session:
    // if correct username and password entered then create session
    String financeAdminSess = adminUsername;
    session.setAttribute("financeAdminSess", adminUsername);                                        
    String redirectURL = "finance_admin_home.jsp";
    response.sendRedirect(redirectURL);
    and here is the code for loggin out:
    // get session
    String financeAdminSess=(String) session.getAttribute("financeAdminSess");
    // remove session
    session.removeAttribute("financeAdminSess<br />");
    // invalidate session
    session.invalidate();
    Any suggestion would be much appreciated.
    Thanks
    Shaxo

  • Invalidate session in BlazeDS

    Hi!
    I need to integrate BlazeDS security with an external security mechanism so I have implemented custom authentication as described in http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=services_security_1 .html. Now I need to invalidate user authentication on server upon certain circunstances. When this happens, I invalidate Session contained in Request parameter of invoke method of TomcatValve. This seems to work but I get a nasty "Duplicated Http Session" in Flex client telling that cookies where removed in server. Is there any clear way to invalidate current user login from BlazeDS?
    I've also tried invalidating FlexSession but then Flex clients hangs.
    Thank you very much.
    Daniel.

    Ummm - isn't that exactly what a session timeout specifies?
    ie how long should it stick around before it "expires" and should be invalidated?
    You don't need to call session.invalidate() - it will do that all by itself.

  • Invalidate Session at all Cluster Weblogic

    hi all,
    i try to save user session in a hashmap on every cluster. and when i need to invalidate it, i will take specified session id. and invalidate it where the session created with normal way to invalidate session.
    public class SessionListener implements HttpSessionListener {
    public HashMap<String, HttpSession> sessionHolder = new HashMap<String, HttpSession>();
    @Override
    public void sessionCreated(HttpSessionEvent se) {
    sessionHolder.put(se.getSession().getId(), se.getSession());
    public void invalidate(String sessionId){
    if(this.sessionHolder.get(sessionId)!= null){
    System.out.println("Invalidate session ID : " + sessionId);
    HttpSession session = sessionHolder.get(sessionId);
    session.invalidate();
    } else {
    System.out.println("Session is not created in this cluster ID : " + sessionId);
    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
    System.out.println("Session " + se.getSession().getId() + " has been destoryed");
    sessionHolder.remove(se.getSession().getId());
    session will perish where invalidate occur. but on other cluster session is still avaliable.
    why the session on other cluster is still. and how to also invalidate session on other cluster.
    thanks.
    Edited by: jeggy on Jan 20, 2011 8:47 PM

    Can you provide little bit more information on how many servers, clusters you have and what kind of replication etc?

  • Is it possible to invalidate session when I click my browsers back button

    Hai
    I have a question.
    I am building a jsp page with multiple forms.As of now,
    no login system has been implemented.
    I need my session to time out when the client click on the back
    button on the browser to prevent data corruption.
    Is there a possible way to do this in Java/ Script
    I know the use of session.invalidate() but how to tie it up to the
    browser's back button
    A second problem
    If I use session.invalidate() on Tomcat 3.2
    I find that it is not invalidated.But this same function on tomcat 4
    doesn't have any problem
    Could anyone help on these issues
    Thanks

    You don't mean you want to invalidate session every time you move to a new page, do you? If you do, after implementation of login system the users will be asked for passwords at each page. If you don't, it's better to use headers for your response.
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Expires", "-1");

  • Is it possible to set up a session with an expert for a team?

    I'm the administrator for a small CC team. While a couple of us are fairly comfortable with the Adobe suite, we're bringing in a few single-app subscribers who need to learn the basics (InCopy specifically). Is it possible to set up a group session with an Adobe expert, i.e. a conference line we can dial in to, so that we're all on the same page?

    Certainly you can setup an expert session. Please go through the link below to setup a session with Adobe experts.
    https://helpx.adobe.com/creative-cloud/team/creative-cloud-teams.html#
    Hope this helps.
    Thanks,
    Ashish

  • How to invalidate session in JSP?

    I am new to web development.
    I have tried to invalidate a session with session.invalidate() but this does not seem to have invalidated the session. Any Help Please??

    please elaborate on your problem,
    session.invalidate(false) should work..false means, if there is a session, invalidate, if not..DONT create one...

  • Invalidate session in another context

    Hi everyone,
    In a nutshell, how to invalidate session of another context residing in another server?
    If it is not possible, what is the best approach to achieve something similar to that?
    Thanks for reading this.
    Z

    u can as well use the MBean interface implementations for Tomcat (JBoss)
    and call some public method of a MBean under name "jboss.web:type=Manager,path=/,host=localhost,*" - like 'expireSession' passing the sessionId string as param
    Rafal Baton Zaczynski
    http://baton.pop.e-wro.pl - Java/JSF/JavaScript - tips&tuts

  • Kill session after Specific Time in Last transaction

    Dear All
    I have Database oracle 10g i need kill the session after last transaction with specific time like(10 minutes for example).
    How I can use it.
    Thanks in advance...

    user8942603 wrote:
    but i don't use application server i use database oracle 10g and the application its flex software that connect to my database.Are you saying you use a dedicated session for each web browser connection? If so how many concurrent connections your database server can handle? Actually, based on your question, I can guess you are already running into too many concurrent sessions issue, right? If so, my suggestion is not to look into killing idling sessions but rather redesigning your site by using at least Oracle's connection pooling.
    SY.

  • Reload Page + Invalidate Session

    (ADF 11gR1 ADFBC) I have an ADF application which can be run with different contexts.
    Every user has a “last_selected_context” stored in the database.
    When launching the application, I fetch this “last selected context” and in the “beforePhase” of the “PagePhaseListener”, I set all my session variables for this context.
    Users may swap from a context to another by selecting it from a popup.
    My problem is : when a user select another context, I have to invalidate the session and reload the page.
    I did this in a function “reloadThePage()”
        public static void reloadThePage()
          FacesContext fContext = FacesContext.getCurrentInstance();
          String viewId = fContext.getViewRoot().getViewId();
          String actionUrl = fContext.getApplication().getViewHandler().getActionURL(fContext, viewId);
          try
            ExternalContext eContext = fContext.getExternalContext();
            String resourceUrl = actionUrl;
           // Invalidate Session
           HttpSession session = (HttpSession)JSFUtils.getFacesContext().getExternalContext().getSession(false);
            if (session != null) {
                session.invalidate();
            eContext.redirect(resourceUrl);
          catch (IOException ioe)
            System.err.println("Problem trying to reload the page:");
            ioe.printStackTrace();
        }It is working fine, but I have this Warning message every time a change the context: Because of inactivity, your session has timed out and is no longer active.  Click OK to reload the page+.
    Is there a way to avoid this Warning message?
    Thanks & Regards
    Nicolas

    Hi Timo,
    Thanks for your help.
    I've tried this but I still have the same warning message.
        public static void reloadThePage()
          FacesContext fContext = FacesContext.getCurrentInstance();
          try
            ExternalContext eContext = fContext.getExternalContext();
            String resourceUrl = "/hr2/faces/home"; 
            // Invalidate Session
            HttpSession session = (HttpSession)JSFUtils.getFacesContext().getExternalContext().getSession(false);
            if (session != null) {
                session.invalidate();
            eContext.redirect(resourceUrl);
          catch (IOException ioe)
            System.err.println("Problem trying to reload the page:");
            ioe.printStackTrace();
        }Any other suggestion ?
    Thanks & Regards
    Nicolas

  • Can we open schedule with specific members?

    Hi,
    Is it possible to open an input schedule with specific members of dimensions selected?
    We know it can be done by using EvHOT, but is there any other method?
    more specifically, we want every user to open schedules with Periodic is selected as the member of Measures dimension.
    Thank you

    In addition to (or instead of) the previous reply, I suggest using
    eTools --> Workbook Options 
    (also in the current view bar as "Set Workbook Options").
    Check "Save the active session CV with this workbook".
    It will keep the current view (CV) that you are using when you save the workbook, so it will reopen with that same view, instead of what the user has pre-set.
    I also recommend hard-coding the Periodic option within the control panel itself, so it does not refer to the CV.

  • Call transaction in new session with the value at hotspot

    Hi all,
    As a hotspot functionality I would like to open a new transaction in a new session with the value at hotspot. For that reason, I am using the FM ABAP4_CALL_TRANSACTION with the option STARTING NEW TASK.
    This FM is not working because Parameter ID is not Maintained for the field (Hotspoted). So no value is passing to new transaction.
    Please suggest any other way to implement this.
    Thanks

    Hi Anil..
    This is the Solution for ur Requirement.   try this program and change as per ur need.
    REPORT  ZSEL_CALL_TCODE.
    data : IT_KNA1 TYPE TABLE OF KNA1 WITH HEADER LINE.
    DATA : IT_SPA TYPE TABLE OF RFC_SPAGPA WITH HEADER LINE.
    SELECT * FROM KNA1 INTO TABLE IT_KNA1 .
    LOOP AT IT_KNA1 .
      WRITE:/ IT_KNA1-KUNNR HOTSPOT ON.
      HIDE IT_KNA1-KUNNR .
    ENDLOOP.
    CLEAR IT_KNA1-KUNNR.
    AT LINE-SELECTION.
    CASE SY-LSIND.
    WHEN 1.
    IF IT_KNA1-KUNNR IS NOT INITIAL.
    REFRESH IT_SPA.
    IT_SPA-PARID = 'KUN'.
    IT_SPA-PARVAL = IT_KNA1-KUNNR.
    APPEND IT_SPA.
      CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'S1'
        EXPORTING
          TCODE                         = 'XD02'
         SKIP_SCREEN                   = ' '
        MODE_VAL                      = 'A'
        UPDATE_VAL                    = 'A'
      IMPORTING
        SUBRC                         =
       TABLES
        USING_TAB                     =
         SPAGPA_TAB                    = IT_SPA
        MESS_TAB                      =
      EXCEPTIONS
        CALL_TRANSACTION_DENIED       = 1
        TCODE_INVALID                 = 2
        OTHERS                        = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
    ENDCASE.
    <b>Reward if Helpful.</b>

  • You cannot shadow a session with multiple monitors enabled in Windows Server 2008 R2

    Searching through the forums (and according to KB2484290) it appears that there is no solution to this problem.  We are rolling out thin clients that are using dual monitors exclusively and we were very surprised to find out that we couldn't shadow
    sessions with dual monitors (which to us means that we can't shadow ANY sessions).  This now completely changes our approach to managing these devices. 
    We are running Windows Server 2008 R2 SP1 with Remote Desktop Services installed.  The thin clients are running Windows Embedded Standard 7 with the latest updates / RDP client. All steps have been followed to ensure that the apropriate settings and
    permissions have been set up to allow access into the session. 
    We tested by unchecking the RDP setting “use all my monitors for the remote session”, with that setting disabled shadowing worked
    Questions:
    1. KB2484290 is from Dec 2010 - It's now April 2012, is there a workaround / hotfix for this issue that will allow us to shadow sessions using the native Microsoft tools?
    2. Are there any recommended alternatives (software)?  Free/Paid - doesn't matter we just need something that will work.  I'm sure there are a few options out there but I am looking for suggestions for what people have used in the past that worked
    best for them to help us narrow down the choices.

    Hi,
    In my experience, so far, the workaround is Remote Assistance, Remote Assistance supports multiple monitors, and is the presently recommended solution if you need this functionality. Remote Assistance is a Windows Server Feature that must be explicitly installed
    on Windows Server 2008 R2; it is already installed with the client versions of the operating system.
    More information:
    Remote Assistance Overview
    http://technet.microsoft.com/en-us/library/cc753881.aspx
    Remote Assistance and Resulting Internet Communication in Windows Server 2008
    http://technet.microsoft.com/en-us/library/cc770456(v=ws.10).aspx
    As far as I know, there are some third-party tools can be used as the solution, such as Teamviewer, ISL Online, etc.
    Please Note: The third-party products discussed here are manufactured by companies that are independent of Microsoft. We make no warranty, implied or otherwise, regarding
    these products' performance or reliability.
    Regards,
    Dollar Wang
    Forum Support
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Technology changes life……

  • I purchased songs from Itunes store and I would like to record a CD to my parents with specific songs but when introduce the cd a message appears that the songs are not in MP3 format, how could I convert them?

    I purchased songs from Itunes store and I would like to record a CD to my parents with specific songs but when introduce the cd a message appears that the songs are not in MP3 format, how could I convert them?

    Hello
    In itunes...preferences you can change the setting to import songs instead of mp4  to mp3. Afer changing this setting, right click to the songs and than you are able to convert to mp3. ths's it

Maybe you are looking for

  • File containing semi-colon(;) cannot be loaded in JVue

    Hello, I am using AutoVue Client/Server Deployment 20.2.2 on Win7. I have file as "semi;colon.txt". When I launch autovue to load this file, I receive error as "Failed to upload file. File not found.". I have following OBJECT tag to launch autovue. <

  • Issue in processing IBAN in FLB2

    Hi Experts, In transaction FLB2 for the lockbox record type 6 record should match the structure of FLB26 which is as given below. Structure: FLB26 (BAI-II format: lockbox record type 6, new check) Field Type Length Description DR001 NUMC 1 Record Typ

  • Has anyone tried disabling DART?

    Has anyone tried disabling DART in the boot-args on an XSERVE running Tiger with 2GB RAM? Are there any effects on the PCI cards, except the obvious? Roger

  • Hidden formatting held over from Word doc conversion

    Our company is shifting our product manuals from Word docs to InDesign.  I'm a newbie to InDesign, and I have just converted my first attempt using File>Place.  This was a moderate size file (15MB), with a lot of embedded images, diagrams, and format

  • SharePoint 2013 Rest API - How to get the item count with startsWith

    Hi All, I am using the below url to get the item count for specfied startsWith. For example I want to know how many items are there in the list which starts with "A". When i hit the below url in the address bar i am getting HTTP not found. siteURL/si