ABOUT CACHE REFRESHING

We just migrated our EJB from 1.1 to 2.0 and Toplink 3.6 to 4.6. We refresh Toplink cache when some extenal system change the data in our database. It was working great before migration but it stopped working after that. Is there anybody who can help us in that area.

Hi Doug,
We are using Weblogic 6.x with SP4 and Toplink 4.6 with EJB 2.0(CMP2.0 - with local inteface). As I mentioned in the first mail we refresh the Toplink cache when External system change our Oracle Database so that user can see the current data. Also we are using HARDCASHWEAKIDENTITY MAP for that.
We are using following sample code for refreshing the cache :
1)
Session session = getTopLinkSession();
session.validateCache();
session.removeFromIdentityMap(memberKey, com.deltadental.cps.subscriber.sms.business.entity.member.MemberBean.class);
2) Here is sample code for our Tolink project:
public Descriptor buildMemberBeanDescriptor() {
     Descriptor descriptor = new Descriptor();
     descriptor.setJavaClass(com.deltadental.cps.subscriber.sms.business.entity.member.MemberBean.class);
     descriptor.addTableName("T8_MEMBER");
     descriptor.addPrimaryKeyFieldName("T8_MEMBER.T8_MEMBER_ID");
     // Descriptor properties.
     descriptor.useHardCacheWeakIdentityMap();
     descriptor.setIdentityMapSize(100);
     descriptor.useRemoteHardCacheWeakIdentityMap();
     descriptor.setRemoteIdentityMapSize(100);
     descriptor.setSequenceNumberFieldName("T8_MEMBER.T8_MEMBER_ID");
     descriptor.setSequenceNumberName("MEMBER_SEQ");
     VersionLockingPolicy lockingPolicy = new VersionLockingPolicy();
     lockingPolicy.setWriteLockFieldName("T8_MEMBER.WRITELOCK");
     lockingPolicy.storeInObject();
     descriptor.setOptimisticLockingPolicy(lockingPolicy);
     descriptor.setAlias("MemberBean");
     // Query manager.
     descriptor.getQueryManager().checkCacheForDoesExist();
     //Named Queries
     //Named Query -- findByPrimaryKey
     ReadObjectQuery namedQuery0 = new ReadObjectQuery(com.deltadental.cps.subscriber.sms.business.entity.member.MemberBean.class);
     namedQuery0.setName("findByPrimaryKey");
     namedQuery0.setCascadePolicy(1);
     namedQuery0.setQueryTimeout(0);
     namedQuery0.setShouldUseWrapperPolicy(true);
     namedQuery0.setShouldBindAllParameters(false);
     namedQuery0.setShouldCacheStatement(false);
     namedQuery0.setSessionName("null");
     namedQuery0.setShouldMaintainCache(true);
     namedQuery0.setShouldRefreshIdentityMapResult(false);
     namedQuery0.conformResultsInUnitOfWork();
     namedQuery0.setLockMode((short)0);
     namedQuery0.addArgument("primaryKey", java.lang.Long.class);
     descriptor.getQueryManager().addQuery("findByPrimaryKey", namedQuery0);

Similar Messages

  • J2EE RFC Metadata cache refresh

    Hi All,
    I've searched a bit on this forum but can't quite find the answer I'm looking for...
    Is it possible to perform a cache refresh without having to restart the server, after making changes to an RFC model and deploying it?  It's a pain in the neck to have to keep restarting DEV, QA and PROD everytime we move something through the CMS that has changes to models.
    I would have thought the assembly step from consolidation to production would have solved this problem but it doesn't.
    Thanks,
    Gareth.

    > Hi Gareth,
    > Several stacks like Web Dynpro, Metadata Interface,
    > e, JCO etc read the ABAP metadata and cache it on the
    > J2EE Engine. Hence the older metadata still remains
    > cached.
    > Solution:
    > 1) If the interface of a function module is changed
    > on the ABAP side, the restart of the J2EE application
    > server updates the meta data caches on Java side. A
    > restart of the ABAP application server is not
    > necessary.
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >                                                    
    > 2) People think about a option to update the meta
    > data cache without a restart of the J2EE application
    > server. But nothing in detail is planned at the
    > moment.
    >
    >
    >
    >
    >
    >                                                    
    > Regards,
    > Arun
    Hi Arun,
    I understand what is happening and how it works and why...  I was simply asking if there is a way to refresh the J2EE cache without restarting the server?
    I think this is something we really need included in future SP's as it is a pain.  As mentioned, I would have throught the assembly/import step in the NWDI CMS would have done something to refresh the cache when an SC is imported into the Production system.
    Gareth.

  • A question about cache group error in TimesTen 7.0.5

    hello, chris:
    we got some errors about cache group :
    2008-09-21 08:56:15.99 Err : ORA: 229574: ora-229574-3085-ogTblGC00405: Failed calling OCI function: OCIStmtFetch()
    2008-09-21 08:56:15.99 Err : ORA: 229574: ora-229574-3085-raUtils00373: Oracle native error code = 1405, msg = ORA-01405: fetched column value is NULL
    2008-09-21 08:56:28.16 Err : ORA: 229576: ora-229576-2057-raStuff09837: Unexpected row count. Expecting 1. Got 0.
    and the exact scene is: our oracle server was restart for some reason, but we didnot restart the cache group agent. then iit start appear those errors informations.
    we want to know, if the oracle server restart, whether we need to restart cache agent?? thank you..

    Yes, the tracking table will track all changes to the associated base table. Only changes that meet the cache group WHERE clause predicate will be refreshed to TimesTen.
    The tracking table is managed automatically by the cache agent. As long as the cache agent is running and AUTOREFRESH is occurring the table will be space managed and old data will be purged.
    It is okay if very occasionally an AUTOREFRESH is unable to complete within its defined interval but if this happens with any regularity then this is a problem since this situation is unsustainable. To remedy this you need to try one or more of:
    1. Tune execution of AUTOREFRESH queries in Oracle. This may mean adding additional indexes to some of the cached Oracle tables. There is an article on this in MetaLink (doc note 473493.1).
    2. Increase the AUTOREFRESH interval so that a refresh can always complete within the defined interval.
    In any event it is important that you have enough space to cope with the 'steady state' size of the tracking table. If the cache agent will not be running for any significant length of time you need to manually cleanup the tracking table. In TimesTen 11g a script to do this is provided but it is not officially supported in TimesTen 7.0.
    If the rate of updates on the base table is such that you cannot arrive at a sustainable situation by tuning etc. then you will need to consider more radical options such as breaking the table into multiple separate tables :-(
    Chris

  • What is Cache refreshing in XI ? Why and when we will do that ?

    Hi Experts
        What is Cache refreshing in XI ? Why we need to do this ? when and all we
        need to do  that ?
        T.Code: sxi_cache   when we will use this ?
        I have no idea on this and any one give more details on this pl....
    Adv..thanx and points to all
    Kiran LVS

    Hi ,
    There are 2 types of caches.....
    CPA cache - is your Collaboration profile agreement cache, ie to mean it will contains the cache copy of all objects created during configuration time (ID).CPA (Collaboration profile agreement )Cache-mainly for J2EE engine/Adapter engine.
    About Cache Monitoring-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/2fd93f130f9115e10000000a155106/content.htm
    Runtime cache - it will contain cache copies of all the objects in XI (IR/ID)
    and active version of all your objects during runtime.
    Check this.......
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301290
    Sekhar

  • DELTA CACHE REFRESH getting  the status red

    Hi,
    while doing the DELTA CACHE REFRESH getting  the status red. There be a traffic light displaying RED on the right part of the screen.
    regards,
    bobby

    I think you are talking about sxi_cache related refresh. If yes, then you may check the following:
    1. Service user PIISUSER is not locked.
    2. RFC Destination INTEGRATION_DIRECTORY_HMI is working properly.
    Regards,
    Prateek

  • Cache Refresh and Queue

    Hi,
    How we can keep cache clear all time. I am doing cache clearance  manually.
    Is there any program which do cache clear.
    Thanks,
    Vishal

    Hi Vishal,
    Cache refresh is done automatically by jobs running in background: LSAI_CACHE3U03 (FM: SAI_CACHE3_REFRESH_BACKGROUND), you can also schedule this. Cache is also refreshred based on events (activation etc).
    When it comes to FM SAI_CACHE3_REFRESH_HTTP, we are talking about sxi_cache and not the CPACache.
    To trigger a cache refresh from the individual Adapter Framework, open a browser window and enter the following URL: http://<host>:<port>/CPACache/refresh?mode=delta|full.
    Regds,
    Pinangshuk.

  • Unable to the cache refresh for the AF

    Hi Guys,
    I am unable to do the full cache refresh for the "AF" in the administration tab under caches overview.
    I tried with PISUPER and also PIAFUSER. It says not authorized.
    any help would be really appreciated
    Thanks,
    srini

    Hi Srinivas,
    Refer this Doc...
    Mentioned about all the caches available in XI:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0332b2a-eb97-2910-b6ba-dbe52a01be34
    Hope it helps..
    Kumar.S

  • Delta refresh and complete cache refresh

    Hi,
    iam doing the complete cache refresh and delta cache refresh in my scenario. after doing that the data's are reflecting very slowly in the RWB valuemapping cache.
    sometimes it is not reflecting in the RWB valuemapping cache.
    i refreshed the CPI cache and SLD cache, still it is not reflecting in the RWB.
    could anyone tell me the solution for this to reflect in the RWB valuemapping cache????
    Regards
    sasi

    Hi,
    In the component monitoring check the RWB component and check the performance monitoring, may be some times performance monitoring is low because of the payload or some other conditions.
    Delta Cache Refresh: Any new objects that have been created/modified during the design/configuration
                          activities are inserted into the temporary database tables when we use delta
                          cache refresh option.(Partial process refresh)
    Complete Cache Refresh: All entries in temporary cache tables are deleted and a background program
                              for inserting the complete information about all the design/configuration
                              objects.(whole process refresh)

  • How does the Web AS Cache refresh work?

    Hi,
    How does the Web AS Cache refresh work?
    I search a guide for Information about this.
    Can anybody help me?
    Thanks.
    Regards.
    Stefan

    hi stefan...
    Cache is nothing but a buffer kinda where all the recently accessed data r stored.
    so sometimes even after making changes u access the page the old data/page is displayed...
    so Web AS cache works as a normal refresh deleting all the recently accessed data/pages...
    it clears or frees ur memory so tht no irrelevant data is obtained...
    for further details, refer to google search... " Web AS Cache Refresh in SAP-Xi"
    /message/514186#514186 [original link is broken] (dont go at the topic name)
    regards..
    vishal
    Message was edited by: vishal prabhakar

  • "Delta Cache Refresh" option not working in SAP XI 3.0

    Hello All,
    We are using an SAP XI 3.0 system with SP9 installed on the same. The system is pretty much stable with all the components including SLD running fine. But!, when I run the Transaction "SXI_CACHE", the "Start Delta Cache Refresh" Button appears as Nullified and hinders the option for refreshing the cache. Could anyone guide me through this and make it work as we need to essentially do this step for the scenario we 're working on.
    Thanks & Regards,
    Venkat.

    Venkat,
    Could you please check the status of you last cache refresh. There should be a traffic light displaying on the right part of the screen. If the last update was unsuccesful. Delta refresh isn't possible.
    Best regards,
    Alwin

  • Cache refresh error, while activating changelists

    Hi all,
    I got a problem, concerning XI Runtime Cache on XI 3.0, SP15 -> when I try to activate changelists from Integration Directory, (SOMETIMES!)XI_CACHE shows status: Error, while refreshing cache
    with Errortype: Communication,
    "if_http_client receive http_communication_failure"
    When I then do a delta or full cache refresh from transaction SXI_CACHE it allways works, even after an error occured before. Some ideas, what I could check?
    Thank you in advance..
    Daniel

    Hi,
    Just check with Tcode SICF and check for all the services are working fine.
    Go thru following links
    http://service.sap.com/NW04 ->How-to Guides-> Exchange Infrastructure->How To handle Caches in SAP XI 3.0
    Also go thru following thread.
    problem with xi cache
    Hope this helps.
    Regards,
    Moorthy
    Regards
    Suraj
    Regards,
    Moorthy

  • Cache Refresh for Adapter Engine is not working

    Hi,
    our adaper engine is not working. At RTW no there are no channels visible and the button "Test Cache Connectivity" leads to a yellow icon for the adapter engine with the error text: "Attempt to fetch cache data from Integration Directory not yet started or still in process".
    The error reason is at <i>http://<j2ee host>:<port>/CPACache/history.jsp</i> available: <i>com.sap.aii.af.service.cpa.impl.exception.CPADirectoryCacheException: Couldn't open Directory URL (http://pixd1.digoff.no:55200/dir/hmi_cache_refresh_service/ext?method=CacheRefresh&mode=C&consumer=af.xd1.dat-dof-xi), due to: HTTP 403: Forbidden</i>
    <b>The cache refreh request from adapter engine to directory gets an 403 error.</b> What is strange: No problem, to execute that request in a browser, i get the right message, no fault.
    I searched for notes or other threads, i could find only <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_xi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d373531383536%7d">SAP note 751856</a> , but it is valid for XI 3.0; we are on PI 7.0.
    I checked out:
    - no user blocked
    - all system users have standard authorisations
    - reimport of SAP BASIS SWC
    - SICF services for XI active
    - destination INTEGRATION_DIRECTORY_HMI working
    Any idea, how i can get the adapter engine working?
    Regards,
    Udo

    Hi,
    There are two ways to display the content of the CPA cache refresh.
    1. The Cache-Update Content-XML
    Document can be stored in the Adapter Framework database (J2EE schema) for further analysis. Here you have to set the property in the J2EE Visual Administrator tool.
    To do so, proceed as follows:
    =>J2EE-service SAP XI AF CPA Cache
    => set property trackCacheUpdateXML= true
    => You can now display the cache update XML with the alias  CPACache
    => View Cache Update History
    => View Cache Update XML
    2. The content of the cache refresh from the Integration Directory intothe CPA cache can be written to an XML file: Here you have to set the property inthe J2EE Visual Administrator tool:
    =>J2EE-service SAP XI AF CPA Cache
    => set property J2EE service SAP XI AF CPA Cache cacheUpdateDebugFile = true
    => the CPA cache refresh XML file will be in the server(0) directory search for the following file names:
    => value of the property cacheUpdateDebugFile.deltaif you intend to see the delta refresh accordingly and the value of the property cacheUpdateDebugFile.full if
    you intend to see the full cache refresh content
    Note: After your analysis, do not forget to reset the properties value to false.
    You can delete the XML cache-
    refresh table: alias CPACache
    => View Cache Update History
    => Delete History
    Also check out the user and its permission.
    regards
    Aashish Sinha
    PS : Reward points if Helpful

  • Error in INTEGRATION_DIRECTORY_HMI and CACHE REFRESH

    Hi guys, well after checking the forum and several blogs i can't get rid of my problem!
    I have a problem concerning INTEGRATION_DIRECTORY_HMI and CACHE REFRESH.
    i wanted to get a file from a FTP-Server via CC and i got error:
      <SAP:AdditionalText>Error when reading HTTP destination: INTEGRATION_DIRECTORY_HMI.</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error while refreshing the XI runtime cache</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
    Because of this i tried to update my cache (SXI_CACHE). When i do a Delta Cache Refresh i get:
    Prefix Number: entry missing for system SSID client 100.
    When i do a complete Cache Refresh nothing happens at all. I also checked the cache notification in IB - Integration Directory where i fin dout that only the Integration Server (ABAP Cache) won't refresh. Well status is started but nothing else is happening.
    Then i checked the RFC INTEGRATION_DIRECTORY_HMI, did a connection test where i get an Internal Server error.
    Let me tell u that the systems runs very well in the last days but now i have no clue what might be wrong.
    Can somebody please advice me? I already read all blogs concerning this and also did a complete system-restart....
    br Jens

    when you check INTEGRATION_DIRECTORY_HMI with SM59 it is normal to get
    HTTP Response 500 - Internal Server Error. In this case it meens everything OK
    see the rediness check, that is attached to SAP note 817920
    when you start the complete cache refresh, you can see
    the function module SAI_CACHE3_REFRESH_BACKGROUND in SM58. As long as you can see this entry, the cache
    refresh is ongoing. If the refresh takes too long and runs on an error, try to specify another timeout in INTEGRATION_DIRECTORY_HMI or in the ICM
    Best Regards
    Alexander
    Message was edited by:
            Alexander Wrobel
    Message was edited by:
            Alexander Wrobel
    Message was edited by:
            Alexander Wrobel

  • Problems in SLD and Cache refresh (SXI_CACHE).

    Dear Experts,
    I am facing SLD and Cache refresh problems in PI 7.0 on HP-UX.
    1) SXI_CACHE : Last Error During Cache refresh is showing LCR_GET_OWN_BUSINESS_SYSTEM - NO_BUSINESS_SYSTEM error. And also Start Delta Cache Refresh / Start Complete Cache refresh are in deactive mode (Frozen).
    2) SLDCHECK : Log says No Business System for ABC Client 100 ".
    where ABC=SID. Business System INTEGRATION_SERVER_ABC is declared in SLD and client 100 is assigned.
    My question is : Is this a BASIS or DEVELOPER issue? Also please let me know if you have any solutions for the above mentioned issue. Thanks in Advance.
    SLDCHECK Log Snippet:
    SLD server access settings:
    host name: ABCXIDEV
    port number: 50000
    user : PIAPPLUSER
    Use transaction SLDAPICUST if you wish to maintain the SLD server access data
    Launching the SLD GUI in a separate browser window...
    => Verify in the browser GUI that the SLD is in a healthy running state!
    Calling function LCR_LIST_BUSINESS_SYSTEMS
    Retrieving data from the SLD server...
    Function call terminated sucessfully
    List of business systems maintained in the SLD:
    INTEGRATION_SERVER_ABC
    ERP_DEV_100
    Calling function LCR_GET_OWN_BUSINESS_SYSTEM
    Retrieving data from the SLD server...
    No corresponding business system found for system ABC client 100
    => Check and maintain the SLD content for the current client

    Hello,
    Since this is an PI system, your XI consultant must have created/will need to create business systems in SLD for the scenario to work properly. This error is because it cannot find the business system.
    You cannot point out the fingers on Basis or XI and say that it is THEIR issue. Please consult with the consultant who is doing the XI interface and check if the business systems he require are properly created in SLD. If not, create them or ask them to create it (if they are allowed to..).
    From the error, what i can see is that you have defined an integration server INTEGRATION_SERVER_ABC in SLD . the XI interface is checking the required business system in the integration server INTEGRATION_SERVER_ABC in SLD but cannot find it over there. Please check the integration server INTEGRATION_SERVER_ABC in SLD and talk to the XI consultant and you will be able to fix this with their help.
    Hope this helps you..
    Regards,
    Jazz

  • Is CPA Cache refresh linked with  ftp or file pooling process in XI?

    Hi,
    I have a file to file scenario using Transport protocol as FTP in XI 3.0 SP 15.
    When we try to sends some file using ftp protocol where we are using
    FTP  connection parameters
    Server                          = <CORRECT IP>,
    Port                               =  21 ,
    User name                <CORRECT NAME>,
    Password                  <PASSWORD> ,
    Data Connection           = Active
    Connection Seq          = None
    Connection Mode          = Permanently
    Transfer Mode            =   Text
    Processing Parameters
    Quality of Service    = Exactly Once
    Pooling Interval        = 1 sec
    Processing Mode    = delete
    File Type                   = Text
    File encoding           = utf-8                 
    The problem we are facing like some time the ftp is not working even the file is present in the location for pick up. If few files are stacked up to be collected then when we are using CPA Cache refresh in Full mode manually then it fetches all the files from the location but the problem is that ,we have a time constraint for this process to be completed in just 60 seconds if we are not able to pick up a  file in 60 Secs then the file will be treated as invalid.
    So I just want to know how Manual CPA CACHE refresh in full mode generally solve the problem.
    Next if more files will be stacked up then cache refresh also failed to solve the problem and more cache refresh result in NOT pooling any other files in XI including the above discussed flow.
    So,in anyway Cache refresh linked with ftp or file pooling process in XI?
    Please assist me in correctly understating the whole problem and what solution could be put to solve this.
    Thanks,
    Satya
    Edited by: Satya Jethy on Mar 14, 2008 12:28 PM

    Hi Suraj,
      If you see my query i have mentioned that the pooling interval is 1 Second.
    If we are not able to pick the file with in 60 Secs as this is a  real time scenario so the file will be treated as a invalid file.
    Moreover this problem is happening some time.
    I have also checked the component monitoring it is saying everything is ok as because we are receiving the file with out any error and the file transfer is also success.The only problem is that it is not collecting the files from the given location.
    Hope i make you understnad the problem .If not please revert back i will try to explain once again.
    Thanks,
    Satya

Maybe you are looking for