Reloading a single object from DB to cache

Hello:
We are using near+distributed caches with read-through/write-behind persistence to DB.
While doing support, sometimes we need to modify a single field of an object (for whatever reason).
It looks like Coherence way to do this would be map.put() resulting in async invocation of CacheStore. The problem in our case is that we do not have UI facilities for modifying object fields. Before Coherence we went to DB, modified a single row via SQL query and it was picked up by the app. It was very convenient since we did not have to reconstruct the object which often contains data from several tables, one or more rows from every table.
So the question is whether it is possible to make Coherence re-read an object from DB even if it is already in cache.
Thanks!

One object but it differs for different users ?
Then it's an object per user, and you should store it in the session.
Why do you think this is a performance overhead ?
"Premature optimization is the root of all evil."

Similar Messages

  • Drag single object from datagrid with customitemrenderer to new datagrid

    Hi there,
    If searched the internet for this solution but could not find it (maybe searching on the wrong searchwords..)
    I have a datagrid with a custom itemrenderer. It shows the product, some product specs and the price/package amount.
    The price per package is shown 4 times as pricelabels. Like 30pcs for 20 euro, 60, pieces for 35 euro etc...
    Normal dragging and dropping works like a charm but I dont want my row dragabble but the 4 price labels in the row. Drag one of them to the new datagrid.
    Is this possible?
    Thanx

    Something related to it,
    http://www.mechansp.com/prod_mecgrid.php#dragdrop

  • How to remove an object from Buffer Cache

    Hi,
    I have a simple question. How can I remove an object from the Buffer Cache in Oracle 10gR2 ?
    I am doing some tuning tasks in a shared development database, so I can't do "alter system flush shared_pool" because it will affect other people who are running their queries. So I want to remove from Buffer Cache only the objects that I know that I am the only reader. I can see the objects that I want to be removed by querying the V$BH view.
    By the way, I did some "alter system flush shared_pool" and my objects were not removed from the Buffer Cache, and they are not in the "Keep".
    Thanks In Advance,
    Christiano

    Further more, you can use CACHE | NOCACHE on table level to indicate how you want Oracle handle the data blocks of said table.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2215507
    CACHE | NOCACHE | CACHE READS
    Use the CACHE clauses to indicate how Oracle Database should store blocks in the buffer cache. If you specify neither CACHE nor NOCACHE, then:
    In a CREATE TABLE statement, NOCACHE is the default
    In an ALTER TABLE statement, the existing value is not changed.
    CACHE For data that is accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the most recently used end of the least recently used (LRU) list in the buffer cache when a full table scan is performed. This attribute is useful for small lookup tables.
    As a parameter in the LOB_storage_clause, CACHE specifies that the database places LOB data values in the buffer cache for faster access.
    Restriction on CACHE You cannot specify CACHE for an index-organized table. However, index-organized tables implicitly provide CACHE behavior.
    NOCACHE For data that is not accessed frequently, this clause indicates that the blocks retrieved for this table are placed at the least recently used end of the LRU list in the buffer cache when a full table scan is performed. NOCACHE is the default for LOB storage.
    As a parameter in the LOB_storage_clause, NOCACHE specifies that the LOB value either is not brought into the buffer cache or is brought into the buffer cache and placed at the least recently used end of the LRU list. The latter is the default behavior.
    Restriction on NOCACHE You cannot specify NOCACHE for an index-organized table.
    CACHE READS CACHE READS applies only to LOB storage. It specifies that LOB values are brought into the buffer cache only during read operations but not during write operations.

  • Webutil_file_transfer url_to_client places objects in the Java Cache

    Hi,
    I'm using webutil_file_transfer url_to_client to download a PDF file.
    Once I downloaded the PDF file, it is visible in the Client Java Cache Viewer. When I try to run the download again webutil takes the PDF from the Cache instead taking the newer PDF from the Server where the URL is pointing to.
    So the URL I passing is each time the same, but the PDF file on the Server is getting updated very often.
    I don't usethe WEBCACHE port!
    My question now is. Can I avoid webutil to put does PDF file in the Java Cache on the Client. Or is there any utility to remove selected objects from the Java Cache.
    Does anybody have a Idea how to avoid such a behaviour?
    Fatih

    Hi Craig,
    with the help of Oracle Support, we found the reason and also a workaround for this issue.
    The real cause:
    By default the java applet parameter DefaultUseCaches is true an all files downloaded within an applet is going throug the Java Client Cache.
    WEBUTIL does not touch this parameter, so it keeps staying default (true).
    Solution/workaround:
    With the methode setDefaultUseCaches it possible to disable/enable the default Cache setting.
    So it's possible to disable the cache with a small Java Bean running in Forms, which disable the Cache before WEBUTIL_FILE_TRANSFER and enable it after the successfull download.
    here is an extract of the bean code:
    URL u = new URL( "http:" );
    URLConnection uc = u.openConnection();
    uc.setDefaultUseCaches(false);
    thank you for your time!
    regards,
    Fatih

  • Loading a tree of objects from a cache in a single call using an aggregator

    Hi,
    I currently have the following problem. I am trying to load a tree of objects from coherence by recursing up an object tree from a child object.
    What is currently in place is something like this (not actual implementation).
    Child child...// initialisation of Child;
    List<Parent> parents = new LinkedList<Parent>();
    Parent parent = null;
    int parentId = child.getParentId();
    while (true) {
    parent = cache.get(parentId);
    if (parent != null) {
    parents.add(parent);
    parentId = parent.getParentId();
    } else {
    break;
    However, this results in a number of calls over the network to the coherence cache and is proving to be quite inefficient. What I would like is to be able to write something like a filter or an aggregation function which will simply take in the child, or the parent id of the child, and return a list of all the parents (with the recursion logic taking place on the coherence node). This will hopefully reduce network latency considerably.
    Does anybody know how to go about doing this within coherence?

    XML might be a better solution, but using tags should work.
    The Sun tutorial at http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html#68205 should be helpful to you.
    When processing a tag, determine if there is a parent tag by using getParent() or findAncestorWithClass().
    If there is no parent, instantiate your site navigation object based on the tag arguments and save a reference within the tag object. You'll probably want to also add the reference to page or session scope as an attribute for later use.
    If there is a parent, instantiate the new navigation object and then retrieve the parent navigation object from the parent tag (create a getNavigation() method in tag?). Then add the new navigation object to the array in the parent navigation object.

  • Cache refresh of single object interferes with normal message processing

    Hi
    When we do an update of an object in Integration Directory and activate change list AND a message (from a different scenario) is processed through Integration Engine at the same time, the message fails with "No RFC authorization for user <USER>" + "Error while refreshing the XI runtime cache".
    I know that a full cache refresh could cause these issues (and is not recommended) as the cache is cleared and "fresh" objects are entered, but is this also the case when updating the cache with single objects? I have never seen this before...
    We are on PI 7.3
    regards Ole

    Found note 1337797 + http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18180...just [original link is broken] [original link is broken] [original link is broken] [original link is broken] haven't noticed before.

  • Error removing object from cache with write behind

    We have a cache with a DB for a backing store. The cache has a write-behind delay of about 10 seconds.
    We see an error when we:
    - Write new object to the cache
    - Remove object from cache before it gets written to cachestore (because we're still within the 10 secs and the object has not made it to the db yet).
    At first i was thinking "coherence should know if the object is in the db or not, and do the right thing", but i guess that's not the case?

    Hi Ron,
    The configuration for <local-scheme> allows you to add a cache store but you cannot use write-behind, only write-through.
    Presumably you do not want the data to be shared by the different WLS nodes, i.e. if one node puts data in the cache and that is eventually written to a RAC node, that data cannot be seen in the cache by other WLS nodes. Or do you want all the WLS nodes to share the data but just write it to different RAC nodes?
    If you use a local-scheme then the data will only be local to that WLS node and not shared.
    I can think of a possible way to do what you want but it depends on the answer to the above question.
    JK

  • 2 TopLink Java Object from Table to be used in single selectOneChoice

    Hello everyone, can I ask for help on how to solve my problem....
    Here's my scenario, I have 2 tables namely tblCollege and tblCourse, they are related through tblCourse.CollegeCode = tblCollege.Code.
    I use the jdeveloper wizard using TopLink -> Java Object from Table to add these table to my project. I created an EJB Data Control so that I can use them to my Userinterface using ADF Faces.
    What I really want to do is that I need to have selectOneChoice component displaying:
    tblCollege.Name + tblCourse.Name, and it should have a value of tblCollege.Code + tblCourse.Code,
    so for example in my
    tblCollege:
    Code---------Name
    1---------------Science
    2---------------Music
    tblCourse
    Code-------Name-----------CollegeCode
    1-------------Biology----------1
    2-------------Computer-------1
    3-------------Guitar------------2
    what I want in my selectOneChoice is like this:
    value----------display
    1-1--------------Science-Biology
    1-2--------------Science-Computer
    2-3--------------Music-Guitar
    I'm a little stuck on how I'm going to that. Thanks.

    Bawasi,
    I see a couple of angles of attack, but this really depends on the technologies involved. If you are using ADF Bindings in combination with ADF Faces then you need to shape the data at the entity level. If ADF Bindings are no the in equation, you can take a less aggressive approach and shape the data in a managed bean. What is not clear to me is the end-to-end use-case. I see the read-only (i.e. how to get data to the drop box), but I am
    not certain what attribute on an entity you are attempting to set. Are you trying to set the course for the current user or for a master schedule? Finally, notice that the final shape of your data set shows a unique combinations, you could increase the performance of your use-case and ease of development simply by denormalizing your schema.
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Import/Export Single Object

    Hi Folks,
    i tested imort/export for SWCV it is working fine...but when i m trying it for single object like namespace etc...
    I face the problem while exporting/importing a namespace in IR.
    1) I exported a namespace using menu Tools->Export design Objects
    2) Selected the software Component and Mode as using file system in the wizard
    3) Selected my namespace which i want to export
    got the message exported successfully.
    Export Path: D:\usr\sap\PL2\SYS\global\xi\repository_server\export
    File: XI3_0_TEST_2.0_of_xxx.com-nsps.tpz
    <b>I tried to import the same namespcae back into same IR.</b>
    and followed these step.
    1) Copied the .tpz file into import folder.
    2) then using the menu tool->import design Objects i selected my .tpz file
    3) Got the following msg.
    Import source XI3_0_TEST_2.0_of_xxx.com-nsps.tpz imported successfully. All imported design objects integrated successfully 3 import object(s) imported successfully 
    Import file moved to importedFiles\XI3_0_TEST_2.0_of_xxx.com-nsps_2007-02-13_02-41.tpz
    <b>But i was not able to see the imported namespace.</b>
    Also followed this document
    http://help.sap.com/saphelp_nw04/helpdata/en/a8/5e56006c17e748a68bb3843ed5aab8/content.htm
    Can u guide me plz.
    Sachin

    <b>Sreeram</b>
    I m not trying to move it form DEV to QA.
    I m exporting the namespace from DEV. say http://abc.com/xi/test of SWCV  Test of abc.com.
    and then i m trying to import it back to Same DEV box.
    I m getting the sucessfully imported message but not able to see the namespace.
    I tried deleting the namespace after exporting and then importing.
    But still i can't see it.
    However in cache notification and Tools->Find Transfer it is showing that it is sucessfully imported.
    I think it might be the issue with active version... can u help me out.
    <b>Chandra</b>
    i m not changing the name of anything. i got the above message as well, but not able to see the imported object.
    Sachin
    Message was edited by:
            Sachin Dhingra

  • Accessing the same object from multiple classes.

    For the life of me I can't workout how I can access things from classes that haven't created them.
    I don't want to have to use "new" multiple times in seperate classes as that would erase manipulated values.
    I want to be able to access and manipulate an array of objects from multiple classes without resetting the array object values. How do I create a new object then be able to use it from all classes rather than re-creating it?
    Also I need my GUI to recognize the changes my buttons are making to data and reload itself so they show up.
    All help is good help!
    regards,
    Luke Grainger

    As long as you have a headquarters it shouldn't be to painfull. You simply keep a refrence to your ShipDataBase and Arsenal and all your irrellevant stuff in Headquarters. So the start of your Headquarters class would look something like:
    public class Headquarters{
      public Arsenal arsenal;
      public ShipDatabase db;
    //constructor
      public Headquarters(){
        arsenal = new Arsenal(this, ....);
        db = new ShipDatabase(...);
    //The Arsenal class:
    public class Arsenal{
      public Headquarter hq;
      public Arsenal(Headquarter hq, ....){
        this.hq = hq;
        .Then in your ShipDatabase you should, as good programing goes, keep the arraylist as a private class variable, and then make simple public methods to access it. Methods like getShipList(), addToShipList(Ship ship)....
    So when you want to add a ship from arsenal you write:
    hq.db.addToShipList(ship);
    .Or you could of course use a more direct refrence:
    ShipDatabase db = hq.db;
    or even
    ShipList = hq.db.getShipList();
    but this requires that the shiplist in the DB is kept public....
    Hope it was comprehensive enough, and that I answered what you where wondering.
    Sjur
    PS: Initialise the array is what you do right here:
    //constructor
    shipList = new Ship[6];
    shipList[0] = new Ship("Sentry", 15, 10, "Scout");
    " " " "etc
    shipList[5] = new Ship("Sentry", 15, 10, "Scout");PPS: To make code snippets etc. more readable please read this article:
    http://forum.java.sun.com/faq.jsp#messageformat

  • Multiple Materials on a single object

    I'm sure I'm missing something...but I'm finding it impossible to use multiple materials form the 3D toolkit on a single object unless I separate the material differences to separate objects....which I'm sure is crazy. But if I import an object with multiple materials, there seems to be no way to assign the toolkit materials separately. If I drag a toolkit material to one part of the object...the entire object turns into that material. It would seem it would be right if you dragged a toolkit material to the materials list of the object....but that won't work either. Anyone know what I am missing here?
    Thanks in advance for any help

    Right click on the object and select Tools -> Separate Meshes which will divide the object into it's component parts (i.e. parts that aren't part of the same polygonal mesh will be divided)
    From there, you can apply materials to them individually.
    To rejoin them (you don't have to) just select them all, then right click and select Tools -> Collapse Hierarchy.

  • How to restore a single table from a DP Export from a different schema?

    Environment:
    Oracle 11.2.0.3 EE on Solaris
    I was looking at the documentation on DP Import trying to find the correct syntax to import a single table from a DP Export of a different schema.
    So, I want to load table USER1.TABLE1 into USER2.TABLE1 from a DP Export.
    Looking at the REMAP_TABLE options:
    REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablename
    OR
    REMAP_TABLE=[schema.]old_tablename[:partition]:new_tablenameI can't see where to specify the target schema name. The examples had the new table name residing in the same schema with just a new name.
    I looked at the REMAP_SCHEMA but the docs say that will import the entire schema into the new schema and I only want one (1) table.
    Any suggestions are most welcome!
    -gary

    I thought I tried that combination and it seemed to me that the REMAP_SCHEMA somehow over-rode the TABLES= parameter >and started loading all the objects.If it does fail (and it should not) then please post the details here and I will try to see what is happening.
    Let me get back into the sandbox and try it again. I admit I was in a bit of a hurry when I did it the first time.We are all in a hurry, no worries. If it fails, please post the details and the log file.
    Does it make any sense that one parameter would override another?No, this should never happen. We have tons of checks to make sure the job can't have multiple meanings. For example, you can't say
    full=y schemas=foo --- Which do you want, a full export or a list of schema exports, etc.
    Your suggestion was the first thing I thought would work.This should work. If not, please post the log file with the command and the results.
    Dean
    Thanks again for the help and stay tuned for my new attempt.
    -gary

  • How to escape the single quote from email value?

    Hi,
    Is there any way to escape the special character single quote from the email value.
           String ownerQry = "Select Id, email from User where email in('0000'";
            for(int i=0; i<accountData.length; i++)
                ownerQry += ",'" + accountData.TEAM_EMAIL+"'";
    ownerQry += ")";
    QueryResult qrTeam = sfdcCtrl.query(ownerQry);
    When i tried to set the email value on a custom object, its throwing the error as below  and failed to update. <xml-fragment xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><faultcode>sf:MALFORMED_QUERY</faultcode><faultstring>MALFORMED_QUERY:
    '[email protected]','brenden.o'[email protected]','[email protected]'
    ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</faultstring><detail><sf:fault xsi:type="sf:MalformedQueryFault" xmlns:sf="urn:fault.enterprise.soap.sforce.com"><sf:exceptionCode xmlns:sf="urn:fault.enterprise.soap.sforce.com">MALFORMED_QUERY</sf:exceptionCode><sf:exceptionMessage xmlns:sf="urn:fault.enterprise.soap.sforce.com">
    '[email protected]','brenden.o'[email protected]','[email protected]'
    ^ ERROR at Row:1:Column:963 expecting a right parentheses, found 'connor'</sf:exceptionMessage><sf:row xmlns:sf="urn:fault.enterprise.soap.sforce.com">1</sf:row><sf:column xmlns:sf="urn:fault.enterprise.soap.sforce.com">963</sf:column></sf:fault></detail></xml-fragment>

    Thanks Dr.Clap.
    I think its very tricky to implement this.
    Here is the SOQL query. i am passing all the email values.
    Select Id, email from User where email in('0000','o\'[email protected]','[email protected]')
    These values are coming from oracle DB table in the form of array accountData[].TEAM_EMAIL
            String ownerQry = "Select Id, email from User where email in('0000'";
            for(int i=0; i<accountData.length; i++)
               ownerQry += ",'" + accountData.TEAM_EMAIL+"'";
    ownerQry += ")";the array value may contain the email with single quote before @gmail.com which i need to ignore. :-( i think this is very tricky. who knows the solution for this?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to tell if ObjectProxy contains ArrayCollection or single object?

    When I get data back from a web service, the list contains an
    ArrayCollection. Within each ArrayCollection, the item may be
    either a single object, or an ArrayCollection of theser objects. It
    appears FLEX supplies what it thinks is the correct type of
    ObjectProxy object based on the number of children under the parent
    node.
    If the ObjectProxy refers to an ArrayCollection, I want to
    iterate over it, but if it refres to a single object, I want to
    pull off some of it's properties.
    How can I tell at run time if an ObjectProxy refers to an
    ArrayCollection, or a single object? Thanks very much in
    advance!

    Found an answer here:
    http://www.theruntime.com/blogs/be-sharp/archive/2008/02/26/web-services-and-arraycollecti ons-in-adobe-flex-2-how-to-successfully-read-any-number-of-xml-nodes.aspx
    which provides an answer if there are NO child nodes, if
    there is exactly one child node, or if there are multiple child
    nodes...

  • Issues in mapping objects from java to flex - using flex4

    Hi,
    I have a class in java which i want to send to flex4 using BlazeDS as middleware. There are a few issues that i am facing and they are:
    When sending the object across (java to flex), the properties with boolean data type having value as true gets converted to properties with value as  false. Even after setting the value to true it still comes as false on flex side. Can't understand why this is happening.
    When sending the list of object containing property with boolean data type, the object on flex side does not show those properties at all. As of there were no boolean properties in that object.
    Last but not the least, When sending List<ContractFilterVO> contractFilterVOs to flex using remote call, the result typecasted to ArrayCollection does not show the holding objects as ContractFilterVOs but as plain default Object though having all the properties send, except the boolean one mentioned in above points. Basically it is not able to typecast the objects in arraycoolection but the same objects gets typecasted when sent individually.
    In all the above points i am using Remote Service through BlazeDS for connectivity with Java. I have done a lot of this stuff in Flex 3 but doing it for the first time in flex 4, is there anything that Flex 4 needs specific. Below is the pasted code for reference purpose.
    Flex Object
    package com.vo
         [RemoteClass(alias="com.vo.ContractFilterVO")]
    public class ContractFilterVO{
         public function ContractFilterVO(){
         public var contractCode:String;
         public var contractDescription:String;
         public var isIndexation:Boolean;
         public var isAdditional:Boolean;
    * Rmote Part of code
    var remoteObject:RemoteObject = new RemoteObject();
    remoteObject.destination="testService";
    remoteObject.addEventListener(ResultEvent.Result,handleResult);
    public function handleResult(event:ResultEvent):void{
         var contarctFilterVOs:ArrayCollection = event.result as ArrayCollection; //Point 2&3 probelem, if list sent form java
         var contarctFilterVO:ContractFilterVO= event.result as ContractFilterVO; //Point 1 probelem, if only single Object of type ContractFilterVO sent form java
    Java Object
    package com.vo
    public class ContractFilterVO implements Serializable 
         public function ContractFilterVO(){
         private static final long serialVersionUID = 8067201720546217193L;
         private String contractCode;
         private String contractDescription;
         private Boolean isIndexation;
         private Boolean isAdditional;
    I don't understand what is wron in my code on either side, it looks syntactically right. It would be great anyone could help me point out my mistake here. Waiting for right solutions...
    Thanks and Regards,
    Jigar

    Hi Jeffery,
    Thanks for your reply, it did solve my query @ point 3 as well as point 2 where the objects in arraycollection were not geting converted and boolean properties did not appear when list of an objects were received. And hey, i did have public functions for properties defined java class, just forgot to mention here in post, sorry for that.
    The solution you gave was right, but than what if i have a VO which has multiple List of objects coming from Java, than i would have to create an instance of each type of object on flex side this is too tedious, is'nt it? Is there any better solution... out there.
    And jeffery do you some tricks up your sleeve for this Boolean issues to that i am facing in point 1... Still struggling with this one...
    Anyone out there would be more than welcome to point my mistake, if any and provide tips/tricks or solutions...
    Thanks again to Jeffery...
    Waiting for more solutions sooner...
    thanks and Regards,
    Jigar

Maybe you are looking for