Ejemplo n.º 1
0
  /** @since 3.1 */
  @Override
  protected void attachToChannel(DataChannel channel) {

    super.attachToChannel(channel);

    if (mergeHandler != null) {
      mergeHandler.setActive(false);
      mergeHandler = null;
    }

    EventManager eventManager = channel.getEventManager();

    if (eventManager != null) {
      mergeHandler = new DataContextMergeHandler(this);

      // listen to our channel events...
      // note that we must reset listener on channel switch, as there is
      // no
      // guarantee that a new channel uses the same EventManager.
      EventUtil.listenForChannelEvents(channel, mergeHandler);
    }

    if (!usingSharedSnaphsotCache && getObjectStore() != null) {
      DataRowStore cache = getObjectStore().getDataRowCache();

      if (cache != null) {
        cache.setEventManager(eventManager);
      }
    }
  }
Ejemplo n.º 2
0
 // this completely meaningless override is needed to expose the method as
 // package-private ... is there a better way?
 @Override
 protected void fireDataChannelChanged(Object postedBy, GraphDiff changes) {
   super.fireDataChannelChanged(postedBy, changes);
 }
Ejemplo n.º 3
0
 @Override
 protected void attachToRuntime(Injector injector) {
   super.attachToRuntime(injector);
   this.transactionFactory = injector.getInstance(TransactionFactory.class);
 }