How to remove an attribute in Context when session is invalidated?

I set a attribute in the context when i login to my application. When i logoff from my application, i remove the attribute from the context.
But if i close my browser or encounter some error, then the session is not invalidated. The container waits till the session gets timed out and then it invalidates the session. But the attribute that i had set to the context is still there. The next time i login, i check whether the attribute is still available in context. It is.
Scenario : Assume that i have a application and if i open some thing eg: model, then i update the attribute "read only" flag in the context as "true", so that no one can edit the model on which i am working on.
When some other user logs in and tries to edit my model, he will get an error stating that the model is read only. Now if i log off, then i update the read only flag as false, so that some body can edit the same.
But if i close my browser or if i encounter some error, then i am not making the read only flag as false. So even if i am not worling, still the read only flag is set to true in the context. So no one else can work on the model.
My question is, is there a way to edit the context attribute, when i abruptly close my browser window? Is there a way to handle the dangling session objects and invalidate them immediately?

Use the HttpSessionListener to determine when the session is destroyed and remove the attribute then. Be aware that aplication attributes are shared by all sessions and can cause problems in a multi-user environment.

Similar Messages

  • Fedlet: How to remove SPNameQualifier attribute from Authnrequest message

    Hi all,
    Hopefully someone on this forum is able to give me some hints how to proceed.
    I'm trying to understand how SAML2 works, and how (if I get it working with sample application) I can integrate it with our existing application.
    SP: Fedlet (Running on Weblogic 10.3)
    IDP: Shibboleth (Running on Weblogic 10.3)
    Both are running on the same server, but in different domains (and obviously with different ports).
    Fedlet is installed, and has the IDP meta data file loaded. When I go to the fedletsample application, I get the 3 hyperlinks (Of which "Run Identity Provider initiated Single Sign-On" is a broken link). Clicking on the "Run Fedlet (SP) initiated Single Sign-On using HTTP POST binding" brings me to the IDP login page.
    My IDP is using the embedded LDAP server from Weblogic. I enter the UID and Password, and (if details are entered correct), I'm redirected to the SP site again. Unfortunately at the SP site (The fedlet app) the message states "Single Sign On failed.".
    From reading the log file at the IDP, I understand that my user is successfully authenticated, however IDP (Shibboleth) is unable to process "SPNameQualifer"
    The log states a lot but I think the issue is related to an unknown attribute in the NameIDPolicy element:
    My NameIDPolicy in the AuthnRequest looks like this
    =====
         <samlp:NameIDPolicy
              AllowCreate="true"
              Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
              SPNameQualifier="fedletsp"
              xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"/>
    =====
    If I look up the details in the IDP log I see this
    ======
    - Starting to unmarshall DOM element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Targeted QName checking is not available for this unmarshaller, DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy was not verified
    - Building XMLObject for {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Unmarshalling attributes of DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Pre-processing attribute AllowCreate
    - Attribute AllowCreate is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute Format
    - Attribute Format is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute SPNameQualifier
    - Attribute SPNameQualifier is neither a schema type nor namespace, calling processAttribute()
    - Pre-processing attribute {http://www.w3.org/2000/xmlns/}samlp
    - {http://www.w3.org/2000/xmlns/}samlp is a namespace declaration, adding it to the list of namespaces on the XMLObject
    - Unmarshalling other child nodes of DOM Element {urn:oasis:names:tc:SAML:2.0:protocol}NameIDPolicy
    - Unmarshalling child elements of XMLObject {urn:oasis:names:tc:SAML:2.0:protocol}AuthnRequest
    - Unmarshalling child element {urn:oasis:names:tc:SAML:2.0:protocol}RequestedAuthnContextwith unmarshaller org.opensaml.saml2.core.impl.RequestedAuthnContextUnmarshaller
    ======
    From topics I found using google, I understood that this attribute is not required, and that I should "suppres" it from the request.
    Now here come my question, how do you suppress this? I assume I would need to add some information to the idp-extended.xml file that indicates to exclude this attribute (SPNameQualifer) from the authrequest. But unfortunately I'm unable to find this infomation.
    Any help, tips are appreciated. I'm sure somewhere this information is stored, but I'm unable to find it.
    Many thanks
    Peter Daalder
    Edited by: user11240309 on 13-apr-2011 1:29

    I would like to perform similar action too.
    Anyone know how to remove the "standalone" attribute?
    Thanks.

  • How to remove data guard broker configuration when  ORA-16625?

    I setup data guard broker for a standby database. However, we recreate the database and re-setup the standby database. But find the earlier broker configuration still exists. But I cannot remove or disable the configuration or any database within the configuration. When I try to do so I got the error, although all network settings are correct:
    Error: ORA-16625: cannot reach the database
    How to remove the configuration at this stage?
    Thanks for help,

    Hi, I saw same issue when doing switchover testing in my lab environment.prerequisite is primary role and standby role switched and og can be applied without data guard broker.
    Here is the step I resolved the issue
    1)on both primary and standby database
    SQL> alter system set dg_borker_start=false;
    on primary DB:
    SQL>alter system set dg_broker_config_file1='?/dbs/dr1afterswichoverpry.dat';
    SQL>alter system set dg_broker_config_file1='?/dbs/dr2afterswichoverpry.dat';
    on standby DB:
    SQL>alter system set dg_broker_config_file1='?/dbs/dr1afterswichoverstby.dat';
    SQL>alter system set dg_broker_config_file1='?/dbs/dr2afterswichoverstby.dat';
    2) enable dg_borker_start on both primay and sandbby db
    SQL> alter system set dg_borker_start=true;
    3)on primary database to create configuration
    Hope this can help you!
    email: [email protected]

  • How to remove elements/attributes from XML using Xpath in XSLT ??

    Hello ,
    Is there anyway or method of Xpath from which I can delete the elements and attributes from XML at runtime ??
    Like I have such XML and I have to remove per attribute highlighted below
    <person per="and">
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    And want a result like this
    <person>
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    Thanks

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • How do I fix this my iPad when it says invalid sim?

    What can I do for my iPad when it says invalid sim at the top and I can't connect to internet?

    You will need to try to restore your iDevice from the same computer that you most recently synced to.
    Read this: http://support.apple.com/kb/ht1212
    If you can't do the restore then you will need to try Recovery Mode.
    Read this: http://support.apple.com/kb/ht1808

  • How to remove recently accessed channel from desktop session in sun one 7

    Actually we are facing one issue with the desktop session . We created a container and then deployed our jsr 168 portlet in that. Now if we are accessing that portlet through http://host:port/portal/dt?provider=<containerchannel>/<channelfor jsr168> we are actually able to see the portlet. Now we kept the link in one of the menu items of enterprise sample. Now if we click on that link our portlet gets displayed in new window. But the problem is if we refresh the enterprise sample page then it is showing our portlet instead of the content that should be shown in enterprise sample. Can we remove the channel from the desktop session.
    Any help will be highly appreciated
    Edited by: user8941231 on Nov 17, 2010 4:59 AM

    Change your iCloud ID password and the old device will no longer have access to your iCloud account.  You can change it here: https://iforgot.apple.com/iForgot/iForgot.html.  After doing so, you'll need to change it on all your devices too.

  • How to create a attribute to context node with the structure that is in DDIC

    Hi,
    I have created a 3 value attributes while creating a view.
    now i have changed the name of the one of the field in my own database table.
    now the problem is, when i open the webui and try to insert a row. i am getting error like "there is no field with that name(previous name) in collection".
    that is not showing the new name that i have changed. so i deleted the attribute from my view and tried to add the attribute again. and while adding a single attribute it is not taking the ddic structure. and one more problem is, when i open the ui it is showing an error like "  the attribute BaseEntityName is not defined or is still initial  "
    someone help me how to add the one more attribute from the same structure & how to provide BaseEntityName.
    Regards,
    Harry

    Hi Harry,
    If my understanding is correct you have added a attribute with name "ZX" and now you have changed the name of the field to "ZZX" and when you try to add the attribute it gives an error.
    In this case, if you are trying to add a attribute with the same name as you have used before. it will not allow so better to use a new name.
    If the attribute is there and if you are not able to get or set the value of it, Please change the attribute name in the getter and setter methods in the set and get property method call, because by default SAP generates a hard coded text for your attribute name in the methods and if you change the name of the field this will not change.
    Thanks,
    Ashok N.

  • How to remove unnecessary blank(white) page when using FileDownload UI

    Hi, all.
    My env is like the following.
    NW2004s SPS11.
    i tried the file upload/download sample.
    Uploading and Downloading Files in SAP NetWeaver 7.0
    /people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70
    Of course, it works well in normal situation but FileDownload shows
    unnecessary behavior like the following.
    - How to produce : Download file with allowSave behavior option
    - Phenomena : File Download pop-up window is displayed but the
        unnecessary blank(white) page also displayed and this page
        persists even when the download is finished.
    And is there any way to remove this unnecessary page behind the
    pop-up window?
    Best Regards.&#12288;
    Sejoon

    Hi,
        It is not possible to close the blank window that appears while downloading programmatically from within your Web Dynpro application. The user must manually close it.
    Regards,
    Satyajit.

  • How to remove xmlns attribute from XML tag?

    Hello!
    I have a XMLType document:
    --- P R O B L E M # 1 ---
    <?xml version="1.0" encoding="windows-1257" ?>
    <RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    I very need to remove from RESPONSE tag all addition information. Result I need is:
    <?xml version="1.0" encoding="windows-1257" ?>
    <RESPONSE>
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    What can I do in this situation? My Oracle version is 9.2.
    --- P R O B L E M # 2 ---
    How I can create from source XML this one:
    <?xml version="1.0" encoding="windows-1257" ?>
    <MY_RESPONSE>
    <RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>
    </MY_RESPONSE>
    Thanks for your answers!
    Flu

    Maybe the problem#1 can be solved with a simple pl/sql using REPLACE statement. start with the <RESPONSE and look for the end > and get the entire string and replace that with only <RESPONSE> or maybe you can achieve this using xmldom to delete the attributes as part of the element.
    PRoblem#2 can be solved in this way.
    select xmlelement("MY_RESPONSE",
    xmltype('<RESPONSE xmlns="http://testserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://testserver response.xsd">
    <DATA REQUEST_ID="111">
    <ENTITY name="PACKAGE_001">
    <ATTRIBUTE name="PERS_ID" value="1111" />
    <ATTRIBUTE name="FIRST_NAME" value="OLGA" />
    <ATTRIBUTE name="SURNAME" value="NOVIKOVA" />
    </ENTITY>
    </DATA>
    </RESPONSE>')).GetClobVal()
    from dual
    /

  • How to remove a from email address when composing a new email?

    when I compose a new email in the from drop down list there are three emails that are mines that i can use. there is an @icloud.com email there that i did not create. how do i remove it?

    Hi, AC360.
    First, ***** won't help you here. People here are users just like you and I, and as both of us, they like to be treated with respect. So, adding bad-word-like characters won't get you any faster or closer to your solution. And even if you don't want it, you got it. iCloud is here to stay and until Apple decides to change its cloud-based service name, we'll all have icloud.com e-mail addresses.
    But as stated before, you didn't lose your @me.com address and you're not forced to use your icloud.com one.
    Now, focusing on your problem, since you're annoyed because the @icloud.com address is listed in your "from" drop-down, you can simply remove it from there by:
    1. Access iCloud web interface at www.icloud.com
    2. Click the Mail icon (it's the blue one with an envelope in the middle. You can't miss it. )
    3. On the top right corner of the next screen, you'll see a gear-like icon. Click it.
    4. Click "Preferences"
    5. Click "Composing"
    6. In the "Send From" section, uncheck the address [email protected] (where "yourname" is your own iCloud username)
    7. Click "Done"
    8. You're done.
    See? Problem solved. Now you can sleep tight not worrying about what Bad Apple tried to force down your throat.
    Hope I have helped.
    Be good, stay calm, and respect other children here at the playground, ok?
    Cheers,
    JP

  • How do remove a song from nano when thsong was removd from the computer list

    How can I remove a song from the nano when the song wasremoved from the purchase list but didn't come off the nano

    It means no such thing. Your selection of songs to sync remains in iTunes regardless of what is currently on the device. After you delete the music from your device, connect it to iTunes, select it from devices:
    Then select the Music tab, uncheck the few songs you no longer want on the device and resync.

  • How to remove or hide toolbar context menu in visual studio IDE

    Hi All,
    Currently we are extending Visual studio and it's functionality.
    As we know, we can have different categories of tool bars like standard, build, debug etc shown in pic - 
    or we can access the categories via -  View Main Menu -> Toolbars 
    Basically My requirement is that, I don't want to show these options (Build, Debug, Debug Location, Layout, customize , Text Editor, Standard etc) shown in context menu or shown in submenu.  
    How can I achieve it ? Please advice.

    AFAIK, you can only customize it manually, but can't hide the builtin menus:
    http://msdn.microsoft.com/en-us/library/vstudio/wdee4yb6(v=vs.100).aspx
    or maybe you can try vsct:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/f3acc18c-b176-4f06-a8d1-cccff3d4bf7f/how-to-disable-and-enable-menu-commands-in-vspackage?forum=vsx

  • How to remove admin permissions AD DS when admin from one forests access resources in another forest?

    Hello Community
        A  forestA and 
    a forestB exists on the network.
        In forestA, active directory has an administrator.
        In forestB, activre directory also has an administrator.
        There is a trust reletionship between the 2 forests.
        When the administrator for forestA  accesses resources
    in forestB,  how can I make sure that the administrator in
    forestA does not have administrative permissions in foresB?
        Thank you
        Shabeaut

    They do not have access by default unless if you delegate that to them. For high secure environments, you might consider implementing a Selective Authentication: http://technet.microsoft.com/en-us/library/cc755844(v=ws.10).aspx
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Get Active Directory User Last Logon
    Create an Active Directory test domain similar to the production one
    Management of test accounts in an Active Directory production domain - Part I
    Management of test accounts in an Active Directory production domain - Part II
    Management of test accounts in an Active Directory production domain - Part III
    Reset Active Directory user password

  • How to remove individual Attributes?

    I have some name-value pairs in an instance of Attributes().
    Within the Attributes there are several name-value pairs I want to remove.
    But I cannot seem to be able to remove them!
    Attributes myAttributes = new Attributes();
    //myAttributes filled using
    myAttributes.putValue("name", "value");
    //if "date" is one of the attribute names; I want to discard it from myAttributes;
    myAttributes.remove("date");
    //This does not seem to work as if "date" was inclusive then the below still returns the stored date
    myAttributes.getValue("date");
    Simon

    it means that "date" was one of the names in the loaded name-value pairs loaded into myAttributes

  • How to remove dock icon on Mac when main stage is hidden?

    I'm trying to implement a "minimize to system tray" functionality, where when the user closes the app's window, it disappears from the task bar and can be retrieved from the system tray. This works great on Windows and Linux, but on the Mac, the window closes, but the app's icon remains in the dock. Clicking on the dock icon focuses the app, but (perhaps unsurprisingly) does not open the window, which is a pretty bad user experience. Opening the window from the system tray works, so if I could just hide the dock icon I'd be there.
    I found the undocumented PlatformImpl.setTaskbarApplication(false), but it doesn't seem to have any effect. Probably only does something at launch time.
    Bug or feature?
    (I'm using the new Platform.setImplicitExit(false) to keep the app from exiting when the main stage is hidden, but I see the same behavior when using the "create an off-screen dummy stage" kludge in 2.1.)

    Whatever you did last time didn't work - don't try that again!
    Back up everything before you begin.
    Bootcamp Assistant (in Applications/Utilities) will remove Windows partitions, however I expect in this state it will remove the Windows 7 partition. It may resolve the issue, but it will delete all the Windows data. Perhaps Bootcamp Assistant does something extra compared to deleting the partition by hand?
    If it still has the multiple boot icons you will have to erase the HD completely and then restore your OS and user data.
    Do you really want to erase & start over for this minor issue?

Maybe you are looking for

  • Sub-Region in a query

    Hi All, I have to write a query wherein I have to use Divisions in the rows. Now in my system I have these Divisions defined. But furthermore the requirement says that the data should be displayed at sub-region level. these sub regions of a region ar

  • Photoshop CS5 has stopped working while I draw.

    So I have Photoshop CS5 extended and Im using windows 7 ultimate 64 bit. I have a Nvidia Geforce GTX 260m 1gb video card. A Asus G60Vx laptop. 4gb of ram. So heres the story. When Im drawing on a picture it could be from 5 to 45 minutes of drawing ph

  • Intel/PowerPC and Sharing ...

    I just added an Intel Mac to my collection and I hooked my iMac to it to migrate and it didn't work. When I came here to do research everywhere I click on Tiger Info including the top of this forum - Leopard comes up on screen. Is Tiger Information s

  • Status updates history period default

    Hi Is there any way to change the default status updates history date range from 3 months please?  Currently as the status approver for a major change program I'm getting several hundred tasks to approve every day across multiple project plans; the p

  • OVM 3.1.1: OVMM won't rediscover iSCSI LUNS

    Hi, I have setup an new OVMS with multipathing iSCSI. When I first discovered that server, I was able to see 6 IETD volumes, where 4 being the 4 paths to the actual two volumes. Since I wanted to have a more readable name I did the following: - remov