Using the LeaseRequest to unlock a lock.

We are having locking issues in our application, we have the lease-granularity set to "Thread", and out application has a JSP that enables us to flush our caches. I am trying to enable an unlocking mechanism in this JSP to unlock these keys.
I am using the LeaseRequest to access the Lease and unlock it. The problem i am facing is that the Lease status changes from dirty to lease available, which is correct, but the thread itself still holds onto that locked key.
Why does the cache lock not release when i unlock the Lease?
Is there a better way to intercept the unlock/lock operations?
Below is the code snippet of how i am accessing the LeaseRequest and unlocking the Lease.
cacheName = our cache name.
key = key in the cache we are wanting to unlock.
NamedCache cache = CacheFactory.getCache(cacheName);
SafeCacheService service = (SafeCacheService) cache.getCacheService();
ReplicatedCache s = (ReplicatedCache) service.getCacheService();
List list = s.getLockRequestQueue();
Iterator iter = list.iterator();
while(iter.hasNext())
     LeaseRequest leaseReq = (LeaseRequest) iter.next();
     Lease lease = leaseReq.getLease();
     if(lease.getResourceKey().equals(key))
          lease.unlock();
Thanks..

Hi,
The query string in URL won’t be able to meet your requirement.
The OOTB
Search box for a list can be found above the list view, it can search items contains the keyword in the current list:
http://community.office365.com/en-us/f/154/t/171565.aspx
Or if you want to do more customization, work with
Search API programmatically would be required:
http://msdn.microsoft.com/en-us/library/microsoft.office.server.search.query.keywordquery.aspx
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/01/03/how-to-use-the-sharepoint-2013-search-keywordquery-class.aspx
Here is a code demo in this thread can
search items in a particular document library with specific keyword
for your reference:
http://social.technet.microsoft.com/Forums/office/en-US/41699f4b-f1a5-4449-b121-01fbb862436f/how-to-fetch-item-from-document-library-using-query-search-in-sharepoint-2010-?forum=sharepointdevelopmentprevious
Best regards,
Patrick
Patrick Liang
TechNet Community Support

Similar Messages

  • Bought a locked iphone4 5months ago before a deployment, will the apple store unlock a locked iphone4?

    bought a locked iphone4 5 months ago before a deployment, will the apple store unlock a locked iphone?

    Only the provider can unlock the phone and pass the unlock info to Apple. This info will be added to a database and you'll be able to use another SIM when you connect to iTunes after you have been notified that the phone is now unlocked.

  • Can i use the iPhone 5 unlock version for tMobile?

    can i use the iPhone 5 unlock version for tMobile?

    If you unlock a phone, you can use it with any carrier. Just be aware that T-mobile is not a carrier that AppleCare tech support will be able to troubleshoot

  • Can I use the iPhone 5s unlocked model A1533 for LG U  in South Korea

    Can I use the iPhone 5s unlocked model A1533 for LG U  in South Korea

    you might go here http://www.everymac.com/systems/apple/iphone/index-iphone-specs.html to see if the specs for the US phone are compatible with that required in KR

  • Can I use the iphone 5S unlocked t-mobile in Russia? Is it unlocked worlwide or only in the US?

    Can I use the iphone 5S unlocked t-mobile in Russia? Is it unlocked worlwide or only in the US?

    Yes, if purchased directly from Apple, NOT T-Mobile. If purchased from Apple, it will be officially unlocked.
    Be aware, your warranty/support will only be valid in the US, & the phone will only support LTE in North America.

  • Iphone 4 screen not responding. not able to use the slider to unlock the phone

    Hi,
    I have a iphone 4 which was purchased in the UK 2 yrs back. I use this phone in india. Since today morning the screen has become unresponsive and i am not able to use the slider to unlock the screen to be able to make or recieve calls or perform any other fuction on my phone. I spoke to apple customer care in india about this problem and they suggested to try restoring the phone which didnt work out. Now they say that I will have to get this repaired in the UK since apple doesnt have apple stores and service centers in India. I think it is some hardware issue. I am not in a position to send it back to UK since i dont have any friends or relatives there in the UK nor i am traveling to the UK at this point in time. Pls help me out and suggest how can i get my phone replaced in India.
    Regards,
    Rajat

    Then go to Settings/General/Accessibility and turn Zoom to OFF.

  • I'm trying to use the slide to unlock bar but the iPad 3 touch screen is non responsive.

    iPad 3 touch screen non responsive. How can I fix this?
    I'm trying to use the slide to unlock bar but the iPad 3 touch screen is non responsive. How can I fix this!

    I tried that step but it would not work. I think I may have changed a setting.
    I was able to highlight a function but had to tap 3 times to get it to respond
    to the command. I think it's some type of Restriction or Accessibility settings.
    Any suggestions?

  • I am trying to do a hard reset on my iphone 4s it is askling me for a 4 digit code. I never put a code on the 4S. I am using the one to unlock  my new iphone 5 but is not accepting the code. What else can i do?

    trying to do a hard reset on my iphone 4s. never had a lock code on the device. I am using an iphone 5 and after update i add a security code.
    I am using the same one but it does not accep the code.
    Is there any other way to do the hard reset on the device?

    I went to Setting, General, and reset, I select Reset all settings and contents and it asked me for a 4 digit code but when i use the one on my current iphone 5 id doest work.

  • I can't use the control center from my lock screen.

    I just updated my iPhone 5c to the ios 8.0.2, but previous to that update I was able to use the control center from my lockscreen. But now, I can't. I already tried to disable restrictions and it didn't work. Please help.

    Check the settings for this And make sure that the availability of the Control Center from the Lock Screen is turned on.
    Settings > Control Center > Access on Lock Screen
    If it is turned on there try a reset of your iPhone. Press and hold both the Home button and the Sleep/Wake button continuously until the Apple logo appears. Then release the button and let the device restart. You will not lose data doing this. It's like a computer reboot.

  • Why cant you use the fingerprint to unlock phone after it is disabled?

    Is there a way to unlock your phone using the fingerprint scanner after it has been disabled?

    No - you will need to do the following: iOS: Forgot passcode or device disabled

  • How to trap the event before unlock of locked text frames

    How to trap the event before the message "You must check out the contents of this frame in order to make changes. Check out now?" for locked text frames?
    I have tried installing the service Responder kUserEditTextCmdResponder
    The responder event is fired after the unlock of text frame in this case.
    I was trying the service kEditCmdPreProcessService, but I could not find the companion interface for this service.
    How to find the companion interface?

    calle111 wrote:
    The answer to why i need the event executed if nothing has changed is that in my application the text ring will hold some predefined settings for some other controls. If the user selects one of the predefined settings from the text ring a bunch of other controls will take predefined values. These values in the other controls can now be altered by the user. If the user now wants to re-apply the same set of pre-defined settings as last time it should be as simple as selecting the pre-defined settings from the text ring. If now the same value is selected from the text ring, no event will be executed.
    What you should do instead is change the value of the ring to a "special" value (e.g. using a local variable) whenever one of the other settings change, indicating that the settings have been modified. It seems wrong to show an inconsistent value in the ring, right?
    Now, whenever you change it back to one of the default settings, is IS a value changed event and there is no problem. .
    Here's a quick draft.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    event_testerMOD.vi ‏10 KB

  • Can i use the SAP standard package for lock object creation ?

    Dear Guru ,
    I want to create a new lock ojbect for my abap program .
    When i completed the creation , SAP required a new request and it said the object only can be imported to SAP standard package .
    But i saw the help from SAP said :
    >* Package begins with A-S or U-X:
    >These packages are for SAP standard objects. Customer objects cannot be created in them. Changes to objects of these packages are recorded by the Transport Organizer (Request management) and can be transported (see field transport layer.
    In this case ,  Can i use one of the SAP standard package for this creation ? Does it will affect the SAP system ( such as the system upgrade ) ?
    Thanks .
    Best Regards,
    Carlos Zhang
    Moderator message - Please do not use code tags to format text - it should only be used for code
    Edited by: Rob Burbank on May 25, 2010 11:12 AM

    Hi Carlos...
    First , You will never be able to use any standard SAP Package for your custom programs. So don't go for it.
    So in your case what you need to do is , when you save your Lock object , 
    - if you want Transport request to be created , then 
    in the screen shown you need to enter the Z package name (the same package as that of your ABAP Program)
    or
    -if you want it to be stored as local object , then
    specify package as $tmp
    Regards,
    Uma

  • Can I have an iPhone 5s that doesn't use the fingerprint to unlock the phone?

    I want the 5s but I don't like the idea of my phone storing my fingerprint. Can I get the 5s but set it to where i unlock it with a passcode and not the fingerprint scanner?

    Dude.  Once your personal biometric data has been gathered and digitized, it will be available to anyone that is determined enough to get it. PERIOD.  Think of all the other times Apple has said they were not collecting data and it turned out they were.  Think about the recent NSA discussions of backdoors that allow the monitoring of email and other data.  Apple has not come out and said clearly that their A7 chip doesn't have a backdoor, or that there is absolutely no way your fingerprint data could not be accessed and collected.  If it can be stored and retrieved by the iOS on the phone, it can ultimately be accessed by bad guys that are determined enough.  I'm done.  I'm not interested in any device that collects such data.  Why would anyone allow their person and privacy be invaded in that way?  Of course if you buy the phone and agree to the EULA you have consented to the collection and use of this information.  Enjoy!

  • I have an Iphone 4s that I installed the face button app. After trying to use the first time, my phone locked and stopped working. Does anyone knows how to fix that problem or how to reset this phone?

    I have an Iphone 4S that i installed the face button app. After trying to use it, my phone locked and I cannot get it to work anymore. does anyone knows how to reset this phone and get it working again?

    A reset may help. Tap and hold the Home button and the On/Off buttons for approximately 10-15 seconds, until the Apple logo reappears. When the logo appears, release both buttons.
    No content is affected by this procedure.

  • How to disconnect a call in os 7.0.2 without using the wake/sleep button in lock screen which was possible in earlier versions.

    i have no other option since my lock button is not working.

    Yep, this is a change Apple made with iOS 7.0.
    Express your displeasure here:
    http://www.apple.com/feedback/iphone.html

Maybe you are looking for