anchor.diff:        };
   <% end -%>
         getEventBus().fireEvent( new <%= graph.subscribe_started_message.gwt.qualified_event_name %>(<% if graph.instance_root? -%> (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id <% end %>) );
  +<% if repository.keycloak? -%>
  +      <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getKeycloak().updateToken( 10, new java.lang.Runnable()
  +      {
  +        @java.lang.Override
  +        public void run()
  +        {
  +          <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getSessionContext().setAuthenticationToken( <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getKeycloak().getToken() );
  +    <% end -%>
         _remoteSubscriptionService.subscribeTo<%= graph.name %>( getSessionID()<% if graph.cacheable? -%>, eTag<% end -%><% if graph.instance_root? -%>, (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id<% end -%><% if graph.filtered? %>, (<%= Domgen::Java.java_type(graph.filter_parameter, :gwt, :default) %>) filterParameter<% end -%>, callback );
  +<% if repository.keycloak? -%>
  +        }
  +      } );
  +<% end -%>
       }
       else <% end %>
       {
  
positive.code:         }
        };
        getEventBus().fireEvent( new <%= graph.unsubscribe_started_message.gwt.qualified_event_name %>(<% if graph.instance_root? -%> (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id <% end %>) );
        _remoteSubscriptionService.unsubscribeFrom<%= graph.name %>( getSessionID()<% if graph.instance_root? -%>, (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id<% end -%>, callback );
      }
      else <% end %>
      {
        throw new IllegalStateException();
      }
    }
  }
  
negative.code:         }
        };
        getEventBus().fireEvent( new <%= graph.update_started_message.gwt.qualified_event_name %>(<% if graph.instance_root? -%> getRepository().getByID( <%= repository.entity_by_name(graph.instance_root).imit.qualified_name %>.class, (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id ) <% end %>) );
  <% if repository.keycloak? -%>
        <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getKeycloak().updateToken( 10, new java.lang.Runnable()
        {
          @java.lang.Override
          public void run()
          {
            <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getSessionContext().setAuthenticationToken( <%= repository.gwt_rpc.qualified_rpc_services_module_name %>.getKeycloak().getToken() );
      <% end -%>
        _remoteSubscriptionService.update<%= graph.name %>Subscription( getSessionID()<% if graph.instance_root? -%>, (<%= repository.entity_by_name(graph.instance_root).primary_key.imit.java_type %>) id<% end -%>, (<%= Domgen::Java.java_type(graph.filter_parameter, :gwt, :default) %>) filterParameter, callback );
  <% if repository.keycloak? -%>
          }
        } );
  <% end -%>
      }
      else <% end %>
      {
  