anchor.diff:  %     nodes in one erlang vm. But for the processes forming a scalaris
   %     node being able to talk to each other, they have to now their
   %     names (cs_node, config, etc.). This module allows the processes
  -%     to keep their names. 
  +%     to keep their names.
   %
   %     When a new process group is created, a unique "instance_id" is
   %     created, which has to be shared by all nodes in this
  -%     group. 
  -%     
  +%     group.
  +%
   %     {@link register_process/3} registers the name of a process in
   %     his group and stores the instance_id in the calling processes'
   %     environment using {@link erlang:put/2}.
  
positive.code: 
  %@private
  
  on({register_process, InstanceId, Name, Pid}, State) ->
      %io:format("insert: ~p ~n",[{{InstanceId, Name}, Pid}]),
      ets:insert(?MODULE, {{InstanceId, Name}, Pid}),
      cs_send:send_local(Pid , {ok}),
      {State};
  on({drop_state}, State) ->
      ets:delete_all_objects(?MODULE),
      {State};
  
  on(_, _State) ->
      unknown_event.
  
  
negative.code: start_link() ->
      io:format("Start PD~n"),
      gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]).
  
  %@doc Starts the server for unit testing
  start_link_for_unittest() ->
      case whereis(process_dictionary) of
          undefined ->
              gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]);
          _ ->
              cs_send:send_local(get_pid() , {drop_state}),
              already_running
      end.
  
  %%--------------------------------------------------------------------
  %% Function: start() -> {ok,Pid} | ignore | {error,Error}
  %% Description: Starts the server; for use with the test framework
  %%--------------------------------------------------------------------
  %@doc Starts the server; for use with the test framework
  start() ->
      gen_component:start_link(?MODULE, [], [{register_native, process_dictionary}]).
  
  
  