Locking and non-persistent changes in cache

I have a question regarding Optimistic locking and modifying objects in the cache.
I have a case where one client modifies a (persistent) object, but since it is a temporary change, which should not be persisted, it is not within a UOW. However, when the next client reads the same object, it gets the modified value and not the original value, which is not correct.
For the moment, there are no locking defined for the descriptors, but would Optimistic locking help in this case? Does this not only protect when you try to write a change on a stale object to the database?
If you run the risk that someone might change an object, and consequently change the cache and how the object is seen by others, should the reads be performed in a UOW?
Regards,
Katarina

Yes, if you may make changes to the object you must make the changes in the unit of work, even if you do not intend to commit the changes. Reads from the session are strictly read-only.

Similar Messages

  • The concept of http persistent and non-persistent

    pls somebody explain me the concept of "keepalive type http".
    when and where configure the persistent and non-persistent? not clear from the doc that HTTP-head, HTTP-get, classA and classB.
    Thanks in advance.

    Persistent will use HTTP version 1.1 while non-persistent will use version 1.0.
    Use non-persistent only if your server does not support http version 1.1.
    HTTP method HEAD or GET is selected with the command 'keepalive method'.
    A head does not require the server to send us the content of the requested file, but simply an acknowledgement that the file is available.
    The GET will request the complete file from the server and the CSS will verify that the content did not change compare to first GET request.
    Again, I would recommend the default - head, unless you believe somebody could corrupt the content of your website.
    Regards,
    Gilles.

  • I do not find Airdrop logo on my iphone also the location services are locked and cannot be changed.

    I am using an iPhone 5S 64GB 7.1.2 version installed.
    I do not find Airdrop logo on my iphone also the location services is locked and cannot be changed.

    Have you tried a Reset: Hold down the home and sleep buttons, wait for the Apple logo, let go of the buttons.
    If that didn't work try a Restore from your backup in iTunes. If that fails Restore it as a new iPhone in iTunes.
    And if all the above fail, you do not have an employer profile on your iPhone, and there are no Restrictions set, get it serviced.

  • Difference between a persistent messages  and non persistent messages in JM

    Hi
    This question is with respect to persistent messages , and non persistent messages .
    As per the docs it says that for persistent messages the QueueSender.send() blocks until it recivies an acknowledgement .
    Here my question is what is the difference between a persistent messages , and non persistent messages
    Thanks in advance .

    The exact behaviour depends on the JMS provider being used. But since non-persistent messages are defined to be unreliable, the provider may indeed decide that it's not necessary for the server to acknowledge the receipt of a non-durable message from a producer.
    Nigel

  • HT201412 my screen is locked and it wont change

    my screen is locked and it wont change or swtich off.

    What shows on the screen ?
    Depending upon what is on the screen, have you tried a soft-reset ? Press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider if it appears), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Persistent and Non-Persistent messages coexisting

    Hi all,
    I'd like to know if it is possible to send a persistent and a non-persistent message over the same queue using the "deliveryMode"
    argument from "send" method.
    Thanks.

    Yes.
    James
    http://logicblaze.com/

  • Cache work area in background, when completed system become locked and non-responsive

    I have a Windows 7 Ent x64 AMD AM3 965 system, 8gb memory with 2 1TB WD Black spin drives C: for programs and F: for cache.
    My Disk Cache folder f:\AE Cache (50gb allowed) & Media Caches f:\AE MCache (Both cache folders total 32gb after caching)
    I have a 2 minute long animation with serveral comps. (Screenshots of my application, basic simple tutorial)
    Whenever I tell AE to ''cache work area in background'', my whole system starts to become slow, then at the end of the cache I try to open another comp or close program, it will lock up my system for a few minutes until it finished whatever else it needs to finish. When I close AE after background caching I can forget about doing anything for about 10+ minutes, not even able to open task manager to see what is going on because the system does not respond.
    Occurs  on my Work Station and Home PC.
    Is this normal when ''Caching work area background'' and opening another comp or closing AE:CC?
    File size of AE project 1.3mb, rendered = 29mb, 868x564 23.89fps, 16bpc, no sound, 2 min 10sec.

    I wouldn't call it normal, but honestly the "Performance Cache" is simply garbage and has so many bugs, I'm not at all surprised. What I wrote back then still applies:
    http://myleniumblog.com/2012/05/15/make-cs6-work-for-you/
    Simply turn it off and you'll be a lot happier. Build conventional RAM previews to check your comp timing.
    Mylenium

  • HT4972 My iphone 4 is locked and non responsive  - will not even turn off - after attempting to update to iso 5.  At the same time my computer was tring to update itunes.

    My iphone 4 is locked after trying to update to ISO5.  At the same time I was updating Itunes.

    It takes a long time to update itunes, backup your phone and install iOS6.
    I usually do this in 3 steps:
    1) Without the phone connected (and not using over the air update) - update itunes version.
    2) Connect the iphone and let it do a backup
    3) install the new IOS
    Be patient.....

  • Budget has amounts that are locked and cannot be changed?

    Wrong Forum.
    Reposted in E Business Suite
    Message was edited by:
    mrobby

    Have you tried a Reset: Hold down the home and sleep buttons, wait for the Apple logo, let go of the buttons.
    If that didn't work try a Restore from your backup in iTunes. If that fails Restore it as a new iPhone in iTunes.
    And if all the above fail, you do not have an employer profile on your iPhone, and there are no Restrictions set, get it serviced.

  • Entity beans caching non-persistent data between transactions

    Some of the properties in our entity bean implementation classes are not declared
    in our descriptor files, and therefore, are non-persistent (we are using container-managed
    persistence); I will refer to these properties as "non-persistent properties".
    In WebLogic 5.1, we've noticed that the non-persistent properties are cached in
    between transactions. For instance, I ask for a particular Person (Person(James)),
    and I set one of the non-persistent properties (Property(X)) inside Transaction(A).
    In Transaction(B) (which is exclusive of Transaction(A)), I access Property(X)
    and find that it is the same value as I had set in Transaction(A)- this gives
    the appearance that non-persistent entity properties are being cached in between
    transactions.
    The same appears to hold true in WebLogic 7 SP1, however, we must use the "Exclusive"
    concurrency-strategy to maintain this consistency.
    I am worried that this assumption we are making of non-persistent properties is
    not valid in all cases, and the documentation does not promise anything in the
    way of such an assumption. I am worried that the container could kill the Person(James)
    entity implementation instance in the pool after Transaction(A), and create a
    new Person(James) instance to serve Transaction(B)- once that happens our assumption
    fails.
    "Database" concurrency strategy seems to fail our assumption on a regular basis,
    but that makes sense, since the documentation states that the "database will maintain
    the cache", and the container seems more willing to kill instances when they are
    finished with, or create new instances for new transactions.
    So my question is this: What is exactly guaranteed by the "Exclusive" concurrency-strategy?
    Will the assumption that we've made above ever fail under this strategy?
    Thanks in advance for any help.
    Regards,
    James

    It simply means that there is only one entity bean instance per PK in the
    server, and transaction which uses it locks it exclusively.
    James DeFelice <[email protected]> wrote:
    Thank you for the suggestion. I have considered taking this path, but before I
    make a final decision, I was hoping to get a clear answer to the question that
    I stated below:
    What EXACTLY is guaranteed by the "Exclusive" concurrency-strategy? Maybe someone
    from BEA knows?
    "Cameron Purdy" <[email protected]> wrote:
    To be safe: You should clear those values before the ejb load or set
    them
    after (or both).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "James DeFelice" <[email protected]> wrote in message
    news:[email protected]...
    Some of the properties in our entity bean implementation classes arenot
    declared
    in our descriptor files, and therefore, are non-persistent (we areusing
    container-managed
    persistence); I will refer to these properties as "non-persistentproperties".
    In WebLogic 5.1, we've noticed that the non-persistent properties arecached in
    between transactions. For instance, I ask for a particular Person(Person(James)),
    and I set one of the non-persistent properties (Property(X)) insideTransaction(A).
    In Transaction(B) (which is exclusive of Transaction(A)), I accessProperty(X)
    and find that it is the same value as I had set in Transaction(A)-this
    gives
    the appearance that non-persistent entity properties are being cachedin
    between
    transactions.
    The same appears to hold true in WebLogic 7 SP1, however, we must usethe
    "Exclusive"
    concurrency-strategy to maintain this consistency.
    I am worried that this assumption we are making of non-persistentproperties is
    not valid in all cases, and the documentation does not promise anythingin
    the
    way of such an assumption. I am worried that the container could killthe
    Person(James)
    entity implementation instance in the pool after Transaction(A), andcreate a
    new Person(James) instance to serve Transaction(B)- once that happensour
    assumption
    fails.
    "Database" concurrency strategy seems to fail our assumption on a regularbasis,
    but that makes sense, since the documentation states that the "databasewill maintain
    the cache", and the container seems more willing to kill instanceswhen
    they are
    finished with, or create new instances for new transactions.
    So my question is this: What is exactly guaranteed by the "Exclusive"concurrency-strategy?
    Will the assumption that we've made above ever fail under this strategy?
    Thanks in advance for any help.
    Regards,
    James
    Dimitri

  • Non-persistent fields

    Hi,
    I would like to use toplink with objects that contains both persistent and non-persistent fields (unmapped). When I insert such an object to the database using unit-of-work, and then try to query toplink for that same object elsewhere in my program I only get the persistent fields. I've tried using checkCacheThanDatabase() which resolved the problem but this method is only available for ReadObjectQuery not for ReadAllQuery (the javadoc is not consistent with the code).
    My questions:
    1. For ReadObjectQuery, can I trust the cache to always have my object, or is there a risk that the cache will drop it?
    2. What to do with ReadAllQuery?
    3. Any other approach that can work?

    You can make non-persistent attributes remain with the object in a unit of work through using a clone policy and using the postMerge event.
    Your class needs to implement Cloneable and in the descriptor use clone-copy-policy. This will ensure that when a cached object is registered into the unit of work the non-persistent attributes will be maintained.
    When the unit of work merges a transactional object into the session cache you need to make sure you copy the non-persistent attributes from the clone to the cached object. You can do this through a DescriptorEventListener and the postMerge event.
    Example:
    postMerge(DescriptorEvent event) {
    String tempProperty = ((MyClass) event.getObject()).getProperty();
    ((MyClass) event.getOringalObject()).setProperty(tempProperty);
    Note that since the attribute is non-persistent it will not be guaranteed to persist indefinitely. The non-persistent attributes duration will be dependant on your caching policy, if it gets dropped from the cache, a new instance will be built from the database the next time it is accessed.
    The checkCacheThanDatabase checkCacheOnly properties should not have any effect on what you get from the cache. Reads that access the database will still maintain object identity with the cache, and you should get back the correct object.

  • How maintaining the connection table for sticky/persistent/non-persistent?

    Question about how to maintain the connection table for the source(client) and destination(server) in the CSM(or CSS).
    I know the sticky has the table and max size such as 128K(css11501)as per CCO but not clear how works the persistant and non-persistant case.
    Q1) persistant. does it maintain the conntion table to tracking the session? then, any information the table size?
    Q2) non-persistant. is this also have connection table? then, how it works?
    why I'm asking is want to understand how the session keep tracking. for example, the router based on the routing table(stateless) versus PIX firewall has stateful table. As analogue, is the non-persistnet stateless and statefull for the persistent and sticky?
    Thnaks in advance,

    The CSS uses FCB to maintain information about active connections.
    Each connections requires 2 FCB - one for client to vip and one for server to client.
    When you boot the CSS it will immediately reserver a good amount of memory to create a list of FCB.
    Each connection will then take 2 FCB from the list.
    You can do a 'flow stat' from llama mode to verify how much free/used FCB you have.
    When running low on FCB, the CSS will try to allocate more memory.
    Gilles.

  • Why after the new 5.1 update when the iPhone locks and sleeps the wifi goes what appears to be off and it 3G comes on?

    After the new update 5.1 whenever the iPhone locks and sleeps it changes from wifi to 3G.  Before the update whenever even in the lock screen the wifi bars were strong and seemed as if it's working even when the phones asleep. Now with the new 5.1 update in lock screen after the phones been asleep for a minute or two it shows 3G then like after 5 seconds or so the wifi comes on. 

    For some reason, today whenever I wake my phone from sleep the wifi seems to be running.  A few days ago when I first posted the 3G would be on then a few seconds later it would change to wifi.  Does this mean it's transferring data in my pocket all morning so far?

  • My Bridge CC opens in a locked mode - I cannot make any changes (dump cache) - it says "other instances of Adobe Application Manager are running, which must be closed." I have to force quit Bridge to get out of it. I tried to uninstall Bridge and re-insta

    My Bridge CC opens in a locked mode - I cannot make any changes (dump cache) - it says "other instances of Adobe Application Manager are running, which must be closed." I have to force quit Bridge to get out of it. I tried to uninstall Bridge and re-install it but it did the same thing. Any ideas where to go next?
    The fact that I uninstalled Bridge and reloaded it has me concerned as to what to do next.?

    You need to force quit all other (real or fake) instances of the Application Manager.  Instructions differ between Mac or Win.
    A lot more information about your hardware and software is needed.
    BOILERPLATE TEXT:
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CC", but something like CC2014.v.2.2) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    a screen shot of your settings or of the image could be very helpful too,
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • I have the iPad 2 (verizon). The lock rotation is always on (can't change it) and NONE of the sound effects work.

    Since yesterday evening, the lock rotation icon is stuck on, and none of the sound effects work. I have factory restored and restored from a backup twice, same result. And I'v checked the headphone jack.
    Am I missing something?
    THNX

    Assuming that you havn't turned the volume completely down, then have you got notifications muted ? Only notifications (including games) get muted, so the iPod and Videos apps, and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar (and similarly for rotation lock) : double-click the home button; slide from the left; and it's the icon; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085

Maybe you are looking for

  • Re: delivery list for the next 2 weeks

    hi SDN. i have a requirement like i need 2 display the list of sales orders for which the required delivery date is sy-datum + 15. I was asked 2 refer 'for goods issue' in vl06o T.code . but i dont find any delivery list greater than sy-datum. pls te

  • Names of the Table fields

    Hi, i need the field names of the manufacturer name : coordinator name : which are from QM03 trasaction code. if any one knows, please help me. Thanks in advance shiva

  • FAT32 / HFS+ / MacDrive

    **This was initially posted in the iMovie forum, but since history has proven the responses and views to be far more frequent in here, I am reposting I recently purchased an external hard drive which came formatted as FAT32. Due to FAT32's file size

  • Query i need  Chart of account name It does not have any transactions.

    hi. i need a small query.. As per my Requirement.. Normally we are creating chart of account.. Each account May or may not have transactions like Journal Entries we can pass debit and credit.. I want to put in query generator if i run the query.. It

  • I just bought a license for adobe exportpdf??

    Hej, I have a lot of pdf's of scanned documents, which I have to work with. But I can not figure out, how I can edit or even textmark in those files????     greez  Gabi