Toplink Cache not refreshed

In my project, TOPLINK is used. To carry out the CRUD operation, Stored procedures are used on all objectcs.
Toplink query is not used.
In some cases, since we wanted to use the existing Stored procedures for running the business logic, toplink is not used.
After running these procedures, we refresh the Toplink Cache by using "refreshObject(java.lang.Object p1)" method of UnitOfWork before we read the Object.
When we read this object, the data appears to be in sinc with what is present in the database tables.
But when we write the data once again to the database, Toplink some how refers to the Old data ( Data which was present before refreshing).
It seems to be a strange issue.
Kindly help.

If you call refresh on an object already loaded in the UnitOfWork, and the object was modified before you call refresh, the refresh will override the modification done to the object.
You should never need to call refresh.
What you should do instead of refresh is to invalidate on session cache so when ever you read the object later, it will be refresh if was invalidated, so more efficient.
If you use TopLink 11 JPA api you need to flush to get current transaction/uow see the modified data in db.
But realistically, stored procedure do not work well with O-R framework, and you say Toplink query is not used, why not removing TopLink from the equation? If you want better JDBC you can use iBatis or Spring.

Similar Messages

  • Cache not refreshing as expected

    We are having a problem with our cache not refreshing as planned as planned. Cache has been configured to refresh hourly but is not refreshing. We end up having to delete the cache files manually but the problem still persists. Does anyone know a fix for this.
    Edited by: shaolin_obiee on Apr 2, 2012 12:00 PM

    Hi,
    As you mentinoed in your draft....saying...configured the cache to refresh every hour...I thought you are using EPT cache purging method..
    May I know more details how you configured to refresh the cache...that way will try to get informaiton that may help you.
    --sk                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Toplink Cache not getting refreshed after executing UpdateAllQuery

    After executing UpdateAllQuery, the records in the database are getting updated, however the Toplink cache is not getting refreshed with the new data, it still has stale data which is causing issues.
    We're also setting
    updateQuery.setCacheUsage(UpdateAllQuery.INVALIDATE_CACHE);
    Thanks.

    Toplink version is 10.1.3.0.0
    Here is the code
    UpdateAllQuery updateQuery = new UpdateAllQuery(RegisterImpl.class);
    updateQuery.setCacheUsage(UpdateAllQuery.INVALIDATE_CACHE);
    ExpressionBuilder registerBuilder = updateQuery.getExpressionBuilder();
    updateQuery.addArgument("userIdArg");
    updateQuery.addArgument("channelArg");
    updateQuery.addArgument("tokenArg");
    updateQuery.addArgument("dateArg");
    updateQuery.addArgument("businessFuncIdArg");
    Expression reservedDetailRegExp = registerBuilder.get("reservedDetail");
    // build expressions
    Expression userIdExp = reservedDetailRegExp.get("userId").equal(
    registerBuilder.getParameter("userIdArg"));
    Expression channelExp = reservedDetailRegExp.get("channel").equal(
    registerBuilder.getParameter("channelArg"));
    Expression tokenExp = reservedDetailRegExp.get("token").equal(
    registerBuilder.getParameter("tokenArg"));
    Expression dateExp = reservedDetailRegExp.get("date").equal(
    registerBuilder.getParameter("dateArg"));
    Expression busFuncExp = registerBuilder.get("businessFuncId").equal(
    registerBuilder.getParameter("businessFuncIdArg"));
    // set selection criteria
    updateQuery.setSelectionCriteria(userIdExp.and(channelExp.and(tokenExp.and(dateExp
    .and(busFuncExp)))));
    // substitute the values
    updateQuery.addUpdate(reservedDetailRegExp.get("userId"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("channel"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("token"), "");
    updateQuery.addUpdate(reservedDetailRegExp.get("date"), "");
    updateQuery.addUpdate(registerBuilder.get("businessFuncId"), "");
    In the object model for the query, the RegisterImpl has an aggregate mapping (ReservedDetail), which in turn has a number of direct-to-field mappings and an one-to-one mapping to businessFunction (for our query we use a direct query key "businessFuncId")

  • LR keyword filter cache not refreshed after Edit-In PS

    This has driven me nuts since LR3 (running LR4.4 now).  Whenever I edit-in PS CS6 (and older CS versions) the new image does not appear in the film strip. I almost always are filtering on keyword and I know the returning new image has the keyword(s) the original had. You can see the keyword count increase on returning to LR, but the edited image does not show. This forces me to close and then reopen LR which is very intrusive to my workflow. Since other user have reported the same issue since LR3, why has Adobe failed to fix what seems like a simple problem, simply refreshing the keyword filter cache? Can someone from Adobe respond? Thank you for a permanent fix (I hope).

    Yip - I've mentioned this 3 times in this forum but no joy from Adobe...Its is v annoying. I have a workaround, which is still crap - I keyword all my images, then sort by keyword. I then flag the ones I want, but I work on them unflagged. So I just manually scroll along to the next flagged image. Then when you export to PS it appears back in the right place, making it easier to flag...
    Please adobe fix this

  • Refresh toplink cache from tirgger

    How to update the toplink cache due to change in the database by some external process or procedure?
    This question was posted some time back and one of the suggestion was to create a trigger on the table holding the data and implement callout to the toplink cache to refresh. I will appreciate if any one can let me know where I can I find more information to implement such a callout method from trigger on the database table.
    We are accessing the toplink objects from OC4J container from where a singleton is managing the calls to the toplink objects. We already have methods in place to refresh the cached object based on timeouts but now the new requirements are to refresh the objects only if the data is changed in the database.
    Thanks
    Ahmad

    I have url error on this thread : How to refresh cache in TopLink, turn off cache
    [b]Discussion Forums Error
    We cannot process your request at this time. Please try again later.
    Thank's

  • Edited Images Do Not Refresh

    When I edit an image in an external program (PS, Illustrator), Dreamweaver doesn't show the changes. It insists that no changes have been made. Refresh doesn't help, nor does using any of those idiotic internal image editing buttons in DW. (Half of them are greyed out most of the time anyway.)
    There's more information & frustration at this thread: http://forums.adobe.com/message/2181158#2181158 ... which was mysteriously marked "Answered".
    Here's  an example: I have a graphic in an HTML document, stored locally. I  edit the graphic and save it, but DW continues to use the older preview  image. I can see the updated image in Live View, but it actually reverts  back to the earlier image when I return to Design Mode! Madness! Why  would it do that? It also fails to update the preview image when I upload & use absolute URLs to identify the image.
    This was not an issue in CS3 IIRC. I think the addition of those image-editing tools in CS5 have screwed things up somehow, like DW has decided it is the only program on the machine.
    This is one of those things that stops workflow dead in its tracks.

    Also, the issue seems to happen only when working with absolute links
    --  I create a lot of HTML emails for clients, and I'm pretty certain 
    that's the only time I run into this issue. For the rest of my work 
    links are root-relative, and seem to update fine.
    This is why I said what I said because that's what I was afraid of.  I've been skeptical myself of DWs abilities at handling remote content in your specific situation, which unfortunately is very common.  What I would recommend doing is what I have done and submit a feature request to Adobe for future versions since they seem to be moving a bit quicker now after publishing the CS5.5 release to accomodate for HTML5 and CSS3.
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    Personally speaking my recommendation was an HTML email mode where the "browse" function could potentially work with remote connection (eg: FTP) and select the files creating absolute links as you go, and have the ability to turn on inline CSS writing permanently (unlike the current drop-down option in the Properties window).  That was just my suggestion, but the more suggestions people send to Adobe about this, the more likely it is to happen.
    And just as a final note based on what you describe it is a caching issue.  What is happening when working with remote images is that DW downloads a copy locally and then you see that.  Live View always refreshes since it runs against the server, and the Refresh button "should" re-download all images from the server to replace the cached versions, but that does not appear to be working.  You might also want to submit a separate bug report using that same form (there is an option saying Feature Request or Bug Report) so they are aware that the cache not refreshing as often as it should is being viewed as a bug.  From my experiences in working with HTML emails I tend to push people towards services like Mailchimp that allow me as a designer, to simply give them a ZIP file containing their work, they just upload and send.  No absolute linking is necessary since the images are hosted by the ESP so it allows me as a designer to work with all local files, zip and go.  There was another service that someone else mentioned on the forums that has a similar feature that I do apologize that I don't remember the name to because I have no experience with that service, but it's definitely something to consider if you are setting up an account with an ESP.  Unfortunately, there are also places like Constant Contact that has its own custom markup that you must use to even track links in an email, so believe me when I say I've seen both sides of the spectrum.

  • Manually Refresh Toplink cache

    Gurus,
    Can we write some servlet which will alllow to manually refresh toplink cache, on click of button.
    Do we have to change any settings in session.xml or server.xml.
    Please point me in right direction.
    Thanks
    gbk

    There is no straight forward way of refreshing all the objects in the cache (short of looping through all the objects in the cache and manually refreshing them).
    The most common approach to this issue is to determine which queries need refreshing and refresh those.
    If this solution isn't what you were looking for, please provide more detail and I will be happy to help you further.
    Peter

  • A statement is not refreshed as if Statement Caching was enabled

    Here is the c# code:
    OracleConnection conn = null;
    OracleCommand cmd;
    OracleDataReader reader = null;
    string tname;
    conn = new OracleConnection("Data Source=ora10gen;User ID=scott;Password=tiger;");
    conn.Open();
    cmd = conn.CreateCommand();
    cmd.CommandText = "drop table testblob";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "create table testblob (idfld integer not null, col_bin clob)";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "insert into testblob(idfld,col_bin) values(1,empty_clob())";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "select col_bin, rowid from testblob";
    reader = cmd.ExecuteReader();
    reader.Read();
    //I get the type name is "clob"
    tname = reader.GetDataTypeName(0);
    reader.Close();
    //now I recreate the table and change column cob_bin type to blob
    cmd.CommandText = "drop table testblob";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "create table testblob (idfld integer not null, col_bin blob null)";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "insert into testblob(idfld,col_bin) values(1,empty_blob())";
    cmd.ExecuteNonQuery();
    cmd.CommandText = "select col_bin, rowid from testblob";
    reader = cmd.ExecuteReader();
    reader.Read();
    //after read(), I get an exception "ORA-00932: inconsistent datatypes: expected CLOB got BLOB"
    tname = reader.GetDataTypeName(0);
    reader.Close();
    //seems data type of col_bin is not refreshed in client.

    See the response to the following forum item:
    Oracle returning incorrect schema information ?
    Matthew Solnit Mar 19, 2005 1:28 AM by: IT Panther »
    If this is important to you there is some workaround code listed in previous item but this may not work in the future.....

  • Cache not updated?

    We have a the following relationship:
    Application <-*> Card -> Status
    The star means that we have a one-to-many relationship where the Application has many cards.
    First we load up the application and display the card (just one for this case) with it's status. Then the database gets new information from a second client (the status relation is updated). We wait a while (not expecting an immediate update of the TopLink cache), but there is still no update on the next read. We wait a long time, and still no update. Restart of the container fixes it.
    What am I missing here? Can something hold on to the objects so it never expires from cache? Is there an easy way to figure out what is holding on?
    I tried to set the cards "Refreshing Cache Options" to "Always Refresh" with "Disable Cache Hits". No go.
    This is kind of urgent, so any pointers or help would be excellent.
    Anders,

    Hello Anders,
    I would never recommend NoIdentityMap, especially when you have object references. The problem is that object identity is not maintained, which with circular references, opens up the possibility for many problems. StackOverflowException is not surprising, since reading an Employee would cause its manager to be read in, and since there is no identityMap, would need the Employee to be re-read causing the manager to be re-read. Indirection on every relationship would pretty much be required, though it would be better if there were no relationships on descriptors using the NoIdentityMap option.
    As for the Session.copyObject() method, I'm not sure what you mean that the results are correct or incorrect. I'm assuming that you are reading an object from the session - this object then will exist in the session cache; and that it is this object you are copying. The copy created is completely detached from TopLink, and so any changes that get merged into the cached object will not be merged into the copy.
    Best Regards,
    Chris Delahunt

  • Toplink Caching issue

    I have three Entities say C1 , P1 and card. Relation between these
    entities are like this
    P1 to Card ( one - one mapping )
    C1 to Card ( one - many mapping )
    I have three usecases. Usecase 1 uses the mail Entity C1. It will
    create one record using C1. ( keep in mind that there will not be any data for entity card at that time ).
    Second usecase , Usecase 2 , uses Entity P1 and creates data in P1 as
    well as Card.
    Third usecase will again take C1 and try to get the card data which
    were inserted through P1.
    But unfortunately , it is coming as null ... But if I restart the server and access the third usecase then I'm getting all the card data from C1 Entity which were saved through P1 Entity .
    To summarise my finding , issue is with Toplink caching. When i
    accessed the first usecase, C1 is cached. In the second usecase , I updated Entity card using P1. When i accessed the third usecase , toplink is returing the cached entity. Toplink is not able to identify whether related entity got changed or not....
    Workaround is not to use cache for C1 entity. It is working but it will
    not be the correct solution.
    any one faced this issue in Toplink ?
    Correct me if my findings are not correct...

    Hello,
    Its not that the cache isn't working, its that you are updating relationships in the database but not in the cache. Take the case of a 1:M from B->C used in a previous response. It looks like the foreign key used in this relationship (in the C table) is mapped to the C object either as a direct to field mapping, or through a 1:1 to the A object. When you change this so that it now somehow points to the B object, you haven't updated the B object to include the C in its collection. Because B has a 1:M mapping collection of Cs, when you next get that B object from the cache, its collection will not contain the newly referenced C (assuming indirection is not used or has been previously triggered). This is a result of you mapping the 1:M in the first place - since it is storing the collection in the object.
    If you are going to make changes that affect relationships and yet not update the relationships directly I would suggest either:
    A) refreshing affected objects from the database when done. In this case, refreshing the B object will result in TopLink requerying the B->C relation and picking up any changes (depending on your refresh options on the B descriptor though - please check the docs if you need more info).
    B) Not mapping these relationships. Instead, when you need to find C objects referenced from B, query for them.
    Both options are less efficient as they cause more hits to the database. This is why it would be preferred if you updated the relationships when you change fields that affect those relationships, but it is up to you to decide which will work best for your application.
    Please note that the cache is working, in fact the situation you are seeing is due to it working. I am not sure of how your situation would work with DAO as you mentioned in a previous post, but it sounds like it would always hit the database. This situation is a result of you making changes in the database but not changing the object model to reflect those changes, proving that the cache is indeed working. While you mention that some objects are not in your use case, they are in the database but just not mapped in TopLink. In the case of a 1:M mapping, the database shows a 1:1 back relationship that you have not mapped in your object model. So this would be more a case of your object model not matching your database model, and not being taken into account in your use cases.
    Best Regards,
    Chris

  • How do I sync Toplink Cache with my Database?

    Hey guys,
    We are running macro's through an excel sheet that connects to the database and performs Updates and Inserts.
    Since this database update is NOT taking place through TopLink (in a Unit of Work) - we do not see the database changes through the web app on the front end unless we bounce our webserver. Presumably the Toplink cache is re-built on start up...so then we can see the changes.
    My question is, what can I do to make sure the TopLink cache is aware of the database changes we have made through the macro without having to bounce the server? Is there a re-fresh or sync command that can be run?
    This task is sort of a one time thing, so I don't want a solution that involves the cache going to sync itself on a schedule or anything like that. Maybe bouncing is the best solution?
    Thoughts?
    We are using Toplink 9.0.4
    Thanks.

    Hello,
    Because it is a one time thing, if you can make sure no other TopLink process are going on, you can probably get away with initializeAllIdentityMaps() or the intitializeIdentityMap(Class) methods on the session. These will clear the identity maps, having the obvious draw back of removing all object identity which will cause problems with running processes though. It might be better than bouncing the server - it depends on the application. Logging out of the session and logging back in has the same effect of clearing the cache, but with a bit more overhead. Benifit is that running processes will get errors if they continue to use the session, rather than strange behaviior if they continue to use objects after identity is lost.
    Another alternative is to run refresh queries on the data you know might be in the cache or that might have been affected. Drawbacks are that this brings them into the cache if they are not already there.
    TopLink 9.0.4 is a quire a few versions back, and in newer versions there is cache invalidation. An object marked as invalid is not removed, so object identity is maintained, but on the next query the data will be refreshed - ensuring subsequent queries will get results from the database without having to be told explicietly to refresh or being set to always refresh. Invalidation can be triggered on particular objects, classes or the entire cache or different policies can be set to set a time to live etc.
    Except for bouncing the server or logging out of the session, all of the above leave some possibility that a concurrent user will still have a reference to stale data and continue to use it after the process has run on the database. So I hope you use optimistic locking and that your batch process updates the version to avoid other process from overwriting with stale data.
    Best Regards,
    Chris

  • Child Objects  and TopLink Cache

    All,
    I have a problem RE the TopLink cache:
    Object A has a Vector of Object Bs (1:M) and Object B has a Vector of Object Cs(1:M). I am using ValueHolderInterface and indirection pattern for each of these Vectors.
    When I update an Object C, it is not refreshed the next time I read Object A using the readObject(expression). I can see the changes in the database. Can someone tell me the best way to refresh the cache to get the updated Object Cs that belong to Object A.
    What I am doing is updating the C objects that belong to object A (thru Vector B) and then retrieving them again in the very next method call. Hope this makes sense!
    Thanks!
    J

    There is something wrong with your test case, I've seen this before -- if you update a C, then without fail the cached version of C is updated and if you have a handle to the cached A that has the B that has the C in question, then you will see the update. It sounds like perhaps you're not actually looking at the cached A, but instead looking at it from a UOW, etc.
    Send me an email, it's simply my firstname . lastname at Oracle.com. I'll send you a UOW primer that should help better understand these semantics...
    - Don

  • Issues with TopLink Cache Coordination using JMS for manual DB updates

    Hi,
    We are having 2 web application using same Database and Toplink library but 2 session objects for both the applications. We are using JMS for cache coordination. JMS propagating messages successfully between the applications and able to see the same object changes in both the applications properly. Now, we are trying to refresh cache for manual updates in Database. We are trying to refresh single object which is modified in database in one application, refreshing in one application from which refresh happened but not in other application (JMS publishing the topic but updating one).
    Our intention is refreshing in one application so that JMS should coordinate and update in others when DB manual updates. Please let us know any comments for the same.
    Database using: Oracle 11g
    Toplink Version:- 9.0.3

    See,
    http://www.coderanch.com/t/592919/ORM/databases/Toplink-Cache-coordination-JMS-manual

  • Toplink Cache problem

    I am using JDev of following version "Studio Edition Version 10.1.3.1.0.3984
    Build JDEVADF_10.1.3.0_NT_061009.1404.3984".
    I had an application with JSF and Toplink and am facing issues with toplink cache mechanism while TESTING IN JDEV . Following is the scenario.
    1) When clicking on a link, say 'Get status' , i am querying data from database and displaying in JSF.
    2) Later, i am updating particular record.
    3) when i click on the link again (Get status), updated data is not gettng reflected.
    Here is the code to get data and i am calling this method whenever i am clicking on 'Get status' link.
    public Vector getMaintenanceStatusList(){
    Vector lockersStatus = null;
    try {
    Session sess = ToplinkDBUtils.getTopLinkSession();
    sess.validateCache();
    ReadAllQuery query = new ReadAllQuery();
    query.dontCheckCache();
    query.dontMaintainCache();
    query.setReferenceClass(LockerMaintenanceStatus.class);
    query.useDistinct();
    lockersStatus = sess.readAllObjects(LockerMaintenanceStatus.class);
    } catch (DatabaseException e) {
    e.printStackTrace();
    //******** Printing the updated value.
    for (Iterator i = lockersStatus.iterator();i.hasNext();){
    LockerMaintenanceStatus tmp = (LockerMaintenanceStatus)i.next();
    System.out.println("Status value :: "+tmp.getStatus());
    return lockersStatus;
    Here, i am getting old status value for second time though i have updated the database with new status. (scenario if i work in same browser with same toplink session)
    i am getting updated values only when i restart the JDEV oc4j.
    Please let me know how i can solve the problem.
    Thanks!
    Veeraswami K

    Veeraswami,
    In your code you are constructing a query but are not executing it. Instead you are simply calling session.readAllObjects. The result of this call will be the cached versions (based on default cache config).
    I would recommend doing:
    ReadAllQuery query = new ReadAllQuery(LockerMaintenanceStatus.class);
    query.refreshIdentityMapResult();
    lockersStatus = (Vector) sess.executeQuery(query);The other settings you had used would bypass the cache and not result in its results being refreshed.
    Doug

  • Toplink Cache issues in Cluster

    Hi
    Our production environment is have a clustered environment and we have been noticing the following problem. When a user is trying to save a record she repeatedly encounters the "Toplink-5006" exception that I have included below.
    TopLink Error]: 2006.07.19 04:49:23.359--UnitOfWork(115148745)--null--Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
    [TopLink Error]: 2006.07.19 04:49:23.359--UnitOfWork(115148745)--null--Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
    <Jul 19, 2006 4:49:23 PM PDT> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setPeople(java.util.HashMap,java.lang.String,java.lang.String,java.lang.String,java.util.HashSet,com.rhii.mjplus.common.login.data.UserInfoDO)],Xid=BEA1-795A6481D2E1938A8EAD(115171166),Status=Rolled back. [Reason=Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=MS15_mjp),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@6dcf50b),SCInfo[mjp+MS15_mjp]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setPeople(java.util.HashMap,java.lang.String,java.lang.String,java.lang.String,java.util.HashSet,com.rhii.mjplus.common.login.data.UserInfoDO)], weblogic.jdbc=t3://10.253.129.56:2323}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+, XAResources={},NonXAResources={})],CoordinatorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+): Local Exception Stack:
    Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object [[email protected]ce459] cannot be updated because it has changed or been deleted since it was last read.
    Class> com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink_CMP_2_0 Primary Key> [1001280937, 0]
         at oracle.toplink.exceptions.OptimisticLockException.objectChangedSinceLastReadWhenUpdating(Ljava/lang/Object;Loracle/toplink/queryframework/ObjectLevelModifyQuery;)Loracle/toplink/exceptions/OptimisticLockException;(OptimisticLockException.java:109)
    What is puzzling is that the occurance of this nature has increased with user load and the toplink cache does not seem to have been refreshed after it encounters the first Optimistic Lock exception. We have run several test and this is not reproducabile in the DEV environment where we do not have a clustered set. After making a few updates to a record users starts experiencing the problem ... for some this persist for a really long time.
    We do not have Cache synchronization
    Cluster setup is as followes
    There are 4 boxes and each box has one admin and 4 managed servers.
    I have included the toplink-cmp-people.xml ( Thisis the particular entity bean we have a problem with) Our application server is Weblogic and we have Toplink version 9042
    <toplink-ejb-jar>
    <session>
    <name>People</name>
    <project-class>
    com.rhii.mjplus.fo.people.beans.PeopleToplink
    </project-class>
    <login>
    <datasource>MJPool</datasource>
    <non-jts-datasource>MJPool</non-jts-datasource>
    </login>
    <use-remote-relationships>true</use-remote-relationships>
    <customization-class>com.rhii.mjplus.common.TopLinkCustomization
    </customization-class>
    </session>
    </toplink-ejb-jar>
    I would appreciate any kind of feedback
    Thanks
    Lakshmi

    Can you refresh that record using a query before you save it ?
    Hi
    Our production environment is have a clustered
    environment and we have been noticing the following
    problem. When a user is trying to save a record she
    repeatedly encounters the "Toplink-5006" exception
    that I have included below.
    TopLink Error]: 2006.07.19
    04:49:23.359--UnitOfWork(115148745)--null--Exception
    [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2)
    (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    [TopLink Error]: 2006.07.19
    04:49:23.359--UnitOfWork(115148745)--null--Exception
    [TOPLINK-5006] (TopLink (WLS CMP) - 10g (9.0.4.2)
    (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    <Jul 19, 2006 4:49:23 PM PDT> <Error> <EJB>
    <BEA-010026> <Exception occurred during commit of
    transaction Name=[EJB
    com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setP
    eople(java.util.HashMap,java.lang.String,java.lang.Str
    ing,java.lang.String,java.util.HashSet,com.rhii.mjplus
    .common.login.data.UserInfoDO)],Xid=BEA1-795A6481D2E19
    38A8EAD(115171166),Status=Rolled back.
    [Reason=Exception [TOPLINK-5006] (TopLink (WLS CMP) -
    10g (9.0.4.2) (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937,
    0]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=0,seconds
    left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTS
    XAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrap
    per.JTSXAResourceImpl]=(state=rolledback,assigned=MS15
    _mjp),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@6dcf
    50b),SCInfo[mjp+MS15_mjp]=(state=rolledback),propertie
    s=({weblogic.transaction.name=[EJB
    com.rhii.mjplus.fo.people.beans.PeopleManagerBean.setP
    eople(java.util.HashMap,java.lang.String,java.lang.Str
    ing,java.lang.String,java.util.HashSet,com.rhii.mjplus
    .common.login.data.UserInfoDO)],
    weblogic.jdbc=t3://10.253.129.56:2323}),OwnerTransacti
    onManager=ServerTM[ServerCoordinatorDescriptor=(Coordi
    natorURL=MS15_mjp+10.253.129.56:2323+mjp+t3+,
    XAResources={},NonXAResources={})],CoordinatorURL=MS15
    _mjp+10.253.129.56:2323+mjp+t3+): Local Exception
    Stack:
    Exception [TOPLINK-5006] (TopLink (WLS CMP) - 10g
    (9.0.4.2) (Build 040311)):
    oracle.toplink.exceptions.OptimisticLockException
    Exception Description: The object
    [com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLin
    k_CMP_2_0@6dce459] cannot be updated because it has
    changed or been deleted since it was last read.
    Class>
    com.rhii.mjplus.fo.people.beans.People_z2e2a7__TopLink
    CMP2_0 Primary Key> [1001280937, 0]
    at
    t
    oracle.toplink.exceptions.OptimisticLockException.obje
    ctChangedSinceLastReadWhenUpdating(Ljava/lang/Object;L
    oracle/toplink/queryframework/ObjectLevelModifyQuery;)
    Loracle/toplink/exceptions/OptimisticLockException;(Op
    timisticLockException.java:109)
    What is puzzling is that the occurance of this nature
    has increased with user load and the toplink cache
    does not seem to have been refreshed after it
    encounters the first Optimistic Lock exception. We
    have run several test and this is not reproducabile
    in the DEV environment where we do not have a
    clustered set. After making a few updates to a record
    users starts experiencing the problem ... for some
    this persist for a really long time.
    We do not have Cache synchronization
    Cluster setup is as followes
    There are 4 boxes and each box has one admin and 4
    managed servers.
    I have included the toplink-cmp-people.xml ( Thisis
    the particular entity bean we have a problem with)
    Our application server is Weblogic and we have
    Toplink version 9042
    <toplink-ejb-jar>
    <session>
    <name>People</name>
    <project-class>
    com.rhii.mjplus.fo.people.beans.PeopleToplink
    </project-class>
    <login>
    <datasource>MJPool</datasource>
    <non-jts-datasource>MJPool</non-jts-datasource>
    </login>
    <use-remote-relationships>true</use-remote-relationsh
    ips>
    <customization-class>com.rhii.mjplus.common.TopLinkCu
    stomization
    </customization-class>
    </session>
    </toplink-ejb-jar>
    I would appreciate any kind of feedback
    Thanks
    LakshmiCan you refresh that record using a query before you save it ?

Maybe you are looking for

  • Is Aperture 3 the best software for working on a databse of images from different photographers?

    Hi everybody, I have only been using Aperture for a few months and am unsure of its suitability for this project. It seems to me that Aperture is designed for the photographer who wants to work on his own photos. I need to select, re-name, add metada

  • How to set proxy server name in iasenv.ksh?

    How to set the proxy server host and port in the JAVA_ARGS list in the iasenv.ksh file? IAS 6.5 is the server being used.

  • Is JPA discourages use of interface?

    Hello, I am working in J2EE since last 3-4 months. Currently understanding (or i should say it learning) JPA. As per my knowledge, JPA does not support use of interface(as a persistent attribute) in entity classes. I tried to get information about it

  • Set field value problem

    Hi All, I want to set a field value of a class. I do this in the way of modifying codes in getText() method in XXXItemProvider.java as the red frame in the following picture. It generates the following problem But, if I remove the codes, "(NFRSoftgoa

  • What is "Photo Library" in Photos application?

    I think this happened since upgrading to iLife 09, but I'm not sure. I used to have two albums in Photos: Camera Roll and iPod. The latter is an album in iPhoto and I have iTunes set to sync with just that album. But now I have three albums in Photos