UnitOfWork.refreshObject();    don't fire event for Cache Synchronization

My WebApp use JMS for cache synchronization.
and I need to refresh session Cache by using method unitOfWork.refreshObject() but it don't publish any message to JMSserver.
sinse My JMS cache synchronization work well when I do UnitOfWok transaction(insert,update,delete)
How to force cache synchronization ?
thank you,
Kowit Laison

TopLink cache synchronization only synchronizes changes made through a unit of work, it does not synchronize reads or refreshes.
You will need to perform the refresh on each server, or make your own JMS message to notify your other server's to refresh.
You may also wish to investigate the TopLink 10.1.3 Preview release that adds support for Cache Invalidation and Cache Invalidation Synchronization. You may be able to broadcast an invalidation command for the refresh.

Similar Messages

  • Event for cache invalidation

    Hi,
    I'm new to TopLink (10.1.3) and I'm a bit puzzled as to how I'll solve my problem. We are currently loadind resources from the database into memory, about the same way as a ResourceBundle. However, I've set a DailyInvalidationPolicy for the cache and I'm trying to find a way to track an event upon expiry. Is there an Event I can use for a Listener implementation that would reload all my objects into memory from the BD? I've seen events like postRefresh and other events in DescriptorEventAdapter and SessionEventAdapter, but nothing seems to be appropriate. Thanks a lot in advance for any reply...

    Hello,
    The DailyInvalidationPolicy mechanism does not actively invalidate objects. Instead when an object is requested TopLink checks the read date and determines if the object is invalid and requires refreshing. As such the only event available to mark this operation would be a “postRefresh” event.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error handling for distributed cache synchronization

    Hello,
    Can somebody explain to me how the error handling works for the distributed cache synchronization ?
    Say I have four nodes of a weblogic cluster and 4 different sessions on each one of those nodes.
    On Node A an update happens on object B. This update is going to be propogated to all the other nodes B, C, D. But for some reason the connection between node A and node B is lost.
    In the following xml
    <cache-synchronization-manager>
    <clustering-service>...</clustering-service>
    <should-remove-connection-on-error>true</should-remove-connection-on-error>
    If I set this to true does this mean that the Toplink will stop sending updates from node A to node B ? I presume all of this is transparent. In order to handle any errors I do not have to write any code to capture this kind of error .
    Is that correct ?
    Aswin.

    This "should-remove-connection-on-error" option mainly applies to RMI or RMI_IIOP cache synchronization. If you use JMS for cache synchronization, then connectivity and error handling is provided by the JMS service.
    For RMI, when this is set to true (which is the default) if a communication exception occurs in sending the cache synchronization to a server, that server will be removed and no longer synchronized with. The assumption is that the server has gone down, and when it comes back up it will rejoin the cluster and reconnect to this server and resume synchronization. Since it will have an empty cache when it starts back up, it will not have missed anything.
    You do not have to perform any error handling, however if you wish to handle cache synchronization errors you can use a TopLink Session ExceptionHandler. Any cache synchronization errors will be sent to the session's exception handler and allow it to handle the error or be notified of the error. Any errors will also be logged to the TopLink session's log.

  • JMS & Cache synchronization

    We have setup Toplink to do cache synchronization using Tibco JMS. We are using Tomcat Servlet environment. We are using the pre-login event in Toplink to specify the necessary information required for cache synchronization using JMS. For some reason Toplink connects to JMS using the name "anonymous" in addition to connecting with the user name we specify in the code. Toplink also seems to connect to some queue in addition to the Topic that is mentioned in the code. Does anyone know why Toplink would behave like this?

    Hello,
    TopLink uses JNDI to get the TopicConnectionFactory, and will login using the username/password you have specified. It then calls createTopicConnection() that will use the default userid to get a connection to a Topic, so this could be what you are referring to. The login specified in the cache synch setup is only to access JNDI.
    That said, TopLink does not use a queue that I have ever seen. The source code for the JMSClusteringService is shipped with TopLink and can be used to fill in parts left out of the documentation, as well as allow for customizations. In this case, it would be good to review it to get an understanding of the calls TopLink does to connect. If this does not help, I'd need to see the configuration used to set up cache synchronization.
    Best Regards,
    Chris Delahunt

  • How to fire event to generate insert message for the child objects?

    We are in process to integrate CRM On Demand and existing Microsoft SQL DB.
    We have the following problem:
    For ex., we have CRM Object_1 that already synchronized with the SQL DB. CRM also has independent Object_2 and its child Object_2.1
    We dicided that we want to connect the Object_2 as child to the Object_1.
    The question is how to fire event to generate insert message for the Object_2 and Object_2.1?
    What is the best technique? Is it possible to do it by workflow configuration or it needs to be done programmatically?
    Thanks,
    Dmitry
    Edited by: 955827 on Aug 29, 2012 11:57 AM

    Hi,
    integration events can be generated only via worklow. You will need to create separate workflows for each record type (regardless if it is child or parent) because a workflow for the parent record type will not trigger when a child record is created/ associated. Also, the association workflows will trigger only when the specific event occurs.
    There is not way to generate the integrtaion events programatically. They are generated by workflows and are read/ interpreted by a code extension.

  • Hello, My iCal don't synchronize older events than two or three month ago. How can I do to synchronize all my schedule? In iTunes it's all right in Calendars. I don't put a cross in "synchronize event older than ....... days". Thanks for answer.

    Hello, My iCal don't synchronize older events than two or three month ago. How can I do to synchronize all my schedule? In iTunes it's all right in Calendars. I don't put a cross in "synchronize event older than ....... days". Thanks for answer.

    Just saw your post. Better late than never. You may want to
    consider GameBrix.com, where you can create Flash based, casual
    games using your web browser. No downloads are required. You can
    create a game from scratch using a library of images, sounds and
    game mechanics. You can also upload your own. The online script
    editor will allow you to view and edit the ActionScripts associated
    with each game mechanic. In short, a great way to ramp up on game
    design and build your own game without investing a lot of $
    upfront.
    BTW I am associated with GameBrix so any feedback is
    appreciated.

  • How to set fire action event for particular rows in a table

    HI All,
    I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
    The table has columns like fullname,employee id etc.
    So i want to set fire action event for particulars rows only which will saisfy some condition.

    Atanu,
    Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
    Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
    In either case loop through the rows and when your condition is met write the action to be performed in controller.
    Regards,
    Anand

  • In Logic Pro or Pro X Meta Events don't work correctly; for example inserting Stop Playback number 52 in a specific position the playhead stops wrongly several ticks before. Then the button play does not start.

    In Logic, Pro or Pro X Meta Events don't work correctly; for example inserting Stop Playback number 52 in a specific position the playhead stops wrongly several ticks before. Then the button play does not start.

    Curious if what your describing is similar to issue 4 which starts around 9:15 in video...
    https://youtu.be/q93jdOhi4Oc
    If so this started for me, or at least I noticed it for the first time in LPX 10.1.1. What version of logic are you running?
    I've recently found that this issue also affects note timing on instrument tracks that use the "External Instrument" plugin.

  • How to fire event in view controller from component controller.

    I have a component usage that fires an event wich i have subscribed in the component controller.
          iv_usage->subscribe_event( iv_event_name = 'TAKE_IT'
                                     iv_handler = me ).
    After the event the method IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT in the component controller is called.
    method if_bsp_wd_event_handler~handle_event.
    endmethod.
    The usage component is opened as a popup window. After pressing a button, the data is transfered via context node binding to the calling component. But now i want to close the popup.
    My intension is to fire a event for the view controller in the IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT method that closes the popup.
    Is this possible?
    Or let me explain it this way:
    I want to close a popup after a button in the popup is pressed.
    best regards
    Jürgen

    Hello Juergen
    I am assuming your target pop-up is of type ref to IF_BSP_WD_POPUP.
    1.Make this a view controller class attribute.
    2. After the code to create the pop-up, you can add the following block :
    gv_target_popup->set_on_close_event( iv_view = me iv_event_name = 'CLOSEPOPUP').
    3. Now define event handler EH_ONCLOSEPOPUP where you can write the logic for on_close.
    You can access the same reference gv_target_popup at the event handler level as well.
    Hope this helps.
    Regards
    Nisha

  • Client side event for h:outputText... and other JSF component

    Hello friends...
    I need client side (to use Java script ) event for change in <h:outputText /> or <h:inputText...>.
    I want to open a popup window when there is a change in there. I donot want to use onblur() for this. Is there any thing for achiev it.
    Thanks.
    Regard
    Roshan Lal ( I don't know why there is "DOG" display in LIST )
    :-)

    Hi Jacek,
    Unfortunately I think you may be stuck extending Renderer. Another possibility is creating your component via a template, which will be available in JSF 2.0. However, as JSF 2.0 won't be out for a while... you can use JSFTemplating in the meantime:
    http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/
    http://www.theserverside.com/tt/articles/article.tss?l=JSFTemplateComponent
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Dots (events) for every single day in calendar (NEW issue)

    Ever since I upgraded to FW 2.0 I have had "dots" appear in every single day of the calendar (symbolizing events) even though I have no events for those days.
    Now - I KNOW about the issue with the recurring/repeating events as well as events that "begin" after they "end." That said, I have checked EVERY single event I have in the phone and in the calendar in Outlook and NONE of the events are repeating/recurring and all of them are set up properly with correct start/end times.
    From my searching, the above seems to be what's commonly known to cause this problem. Those don't fit MY problem.
    The odd thing here is, if I go backward in the month view on the calendar on the phone to February, there are no dots. There are also no events. However, if I go to March on the month view in the calendar, every single day has dots (and continues). The really weird thing here is if you look at the calendar in the month view while it's on March, you can see the last week of February at the top. And in that last week, while in the "March" view, the last week of February ALL has dots. But again, if you move back to "February," all those dots that were there disappear.
    So...I'm at a loss now. I've wiped the events off the phone. Edited/pruned/etc. events in the Outlook calendar, and then re-synced with the order to overwrite that which is on the phone. Still no luck. Is this a glitch that needs to be corrected with new FW? Would a restore help? I just don't really know anymore..
    Thanks,
    John

    I am having the same issue. However, I am syncing my calendar to my work computer and the issue presented itself when I upgraded to Office 2007 from 2003. I have since removed Office '07 and did a restore to my iphone which cleared the issue. Then did a sync again to Office 2003 and the issue re-appeared. Not sure if '07 added something to my calendar that is hidden but it is very frustrating.

  • How to create EVENTS for a View Cluster.

    Hi Tech Gurus,
    I have created a view cluster on 5 tables. I need to do a validation and this can be done by using events. But i am unable to create a EVENT for the View Cluster. Could anyone please tell me how to create events for a View Cluster.
    Thanks in advance for your esteemed replies.
    Regards,
    Raghavendra Goutham P.

    Hello Pasapula
    When you are in the View Cluster maintenance dialog (SE54) click on dialog "Events".
    Below the field for the view cluster you have an additional field <b>FORM routines main program</b>. There you have to add the main program containing the FORM routines called by the VC events.
    For example: I had defined a normal report containing an include with all the FORM routines. The report contains only the following lines of coding:
    report zus_0120_u1.
    * Common Data und access routines for user exits in VC maintenance
    include LSVCMCOD.
    include  zus_0120_f1. "FORM routines for VC events
    Now in the "Events" dialog of the view cluster maintenance you assign your FORM routines to the events.
    Regards
      Uwe

  • Want to fire event receiver before workflow is execute while adding File in Document Library.

    Hi,
    I have Event receiver and workflow attached to same Document
    Library.
    Is it possible to fire event receiver before Workflow is
    executed ?
    Regards,
    Milind

    Hi,
    According to your description, my understanding is that you want fire event receiver before workflow is excuted.
    If the workflow for a list is set to auto-start, it will always execute before event receiver by default.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/3147/execution-order-of-event-receivers-and-workflow-on-a-list
    As a workaround, you can set the workflow start by manually. Then , after executing the event receiver, you can start workflow using code at the end of event receiver.
    Here is a demo for your reference:
    http://zimmergren.net/technical/starting-a-sharepoint-workflow-from-code-event-receiver
    More information about start workflow using C#:
    http://jainnitin2411.wordpress.com/2012/07/06/programmaticallystartsharepointworkflow/
    Best regards,
    Zhengyu Guo
    Zhengyu Guo
    TechNet Community Support

  • Best Practice for caching global list of objects

    Here's my situation, (I'm guessing this is mostly a question about cache synchronization):
    I have a database with several tables that contain between 10-50 rows of information. The values in these tables CAN be added/edited/deleted, but this happens VERY RARELY. I have to retrieve a list of these objects VERY FREQUENTLY (sometimes all, sometimes with a simple filter) throughout the application.
    What I would like to do is to load these up at startup time and then only query the cache from then on out, managing the cache manually when necessary.
    My questions are:
    What's the best way to guarantee that I can load a list of objects into the cache and always have them there?
    In the above scenario, would I only need to synchronize the cache on add and delete? Would edits be handled automatically?
    Is it better to ditch this approach and to just cache them myself (this doesn't sound great for deploying in a cluster)?
    Ideas?

    The cache synch feature as it exists today is kind of an "all or nothing" thing. You either synch everything in your app, or nothing in your app. There isn't really any mechanism within TopLink cache synch you can exploit for more app specific cache synch.
    Keeping in mind that I haven't spent much time looking at your app and use cases, I still think that the helper class is the way to go, because it sounds like your need for refreshing is rather infrequent and very specific. I would just make use of JMS and have your app send updates.
    I.e., in some node in the cluster:
    Vector changed = new Vector();
    UnitOfWork uow= session.acquireUnitOfWork();
    MyObject mo = uow.registerObject(someObject);
    // user updates mo in a GUI
    changed.addElement(mo);
    uow.commit();
    MoHelper.broadcastChange(changed);
    Then in MoHelper:
    public void broadcast(Vector changed) {
    Hashtable classnameAndIds = new Hashtable();
    iterate over changed
    if (i.getClassname() exists in classAndIDs)
    classAndIds.get(i.getClassname()).add(i.getId());
    else {
    Vector vc = new Vector();
    vc.add(i.getId())
    classAndIds.add(i.getClassname(),vc);
    jmsTopic.send(classAndIds);
    Then in each node in the cluster you have a listener to the topic/queue:
    public void processJMSMessage(Hashtable classnameAndIds) {
    iterate over classAndIds
    Class c = Class.forname(classname);
    ReadAllQuery raq = new ReadAllQuery(c);
    raq.refreshIdentityMapResult();
    ExpressionBuilder b = new ExpressionBuilder();
    Expression exp = b.get("id").in(idsVector);
    roq.setSelectionCriteria(exp);
    session.executeQuery(roq);
    - Don

  • Flex 4 does not dispatch keyboard events for ENTER key.

    Hello everyone. I think I have a strange problem with Flex 4 Beta (4.0.0.8909). My application has had event listener for keyUp event for a month now and suddenly (two days ago) I've noticed that keyUp event is not dispatched for ENTER (ALT also) key. Anyone know why? By the way, I've tried this with keyDown event, also 4.0.0.8847 version of SDK - still the same: no keyboard events for ENTER (and ALT) key.
    Here is the sample application that has got this issue:
    <s:Application
       xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/halo"
       minWidth="640" minHeight="480"
       keyUp="application1_keyUpHandler (event)">
       <fx:Script>
          <![CDATA[
             import mx.controls.Alert;
             protected function application1_keyUpHandler (event: KeyboardEvent):void
                Alert.show ("Key up: " + event.keyCode);
          ]]>
       </fx:Script>
       <s:layout>
          <s:BasicLayout/>
       </s:layout>
       <s:TextArea verticalCenter="0" horizontalCenter="0" width="200"/>
    </s:Application>
    If you run this application and try typing anything in a TextArea you will get alerts with key codes. However, if you press ENTER (or ALT), you will get no alert.
    I'm pretty sure the code above is right so that means there is a bug in latest nightly builds of SDK (i would swhitch to an older build if i knew which one does not have this bug).
    Any ideas?

    Flex harUI wrote:
    That's true, but in this case, I think the text editing code is eating ENTER key in order to prevent parents from seeing it and acting on it (like a submit button).  We'll see if we can find a way around that.
    You can get the ENTER key now by listening in capture phase.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui
    The enter key isn't being disposed of by textedit, the attached example code works without error if you a- remove the alert box and b-set the focus to your text area on initialisation. I agree that pressing the enter key then calling a dialog box will result in the enter key being "gobbled up" as  the enter key is overridden by the dialog box code.
    I think the first suggestion should be to anyone don't use dialogboxes for testing code. If for some reason debugging isn't desirable instead of a trace statement a simple label  can be used as a 'fake' trace.
    David
    Message was edited by: David_F57: I worded this wrong, imho there is no need for a work around, the textarea component works as it should. When intercepting 'system' keycodes there is a need to consider the effect of the intercept and code appropriately to that end.

Maybe you are looking for