Question on events

I have a thread running on server side, which uses local channel to call service method in a loop.

This service method is expected to use events model to distribute some information to all connected clients.

Now, do i need another service like LoginService in chat sample, to let the client login first and create session (?),
before this client can be subscribed to event?

If so, how do i manage this in a thread mentioned in the beginning?

Any advice is greatly appreciated. Thanks.

Another question is, what service should i set the ROEventReceiver.ServiceName property to point to?

Basically i need to find out whats wrong with my setup.

On server side, I have TROSuperTCPServer component, TROInMemoryEventRepository, TROMessage and TROInMemorySessionManager components.

Server.EventRepository property is assigned.

Then i have a service, called GPSService, with assigned EventRepository and SessionManageer properties of TRORemoteDataModule. I have LegacyEvents set to True and RequiresSession set to True for this service.

On client side, i have TROEventReceiver component with associated TROSuperTCPChannel and TROMessage, and i’ve set ServiceName property to point to GPSService. I also have LegacyEvents set to True for TROEventReceiver component.

I have the following code on client side:

ROEventReceiver.RegisterEventHandlers([EID_GPSEvents], [Self]);
ROEventReceiver.Activate;

but i never receive any events on client side.

Do i always need to manually add client’s SessionID to event writer SessionList property before i call an event?

What are the requirements for the service pointed by TROEventReceiver.ServiceName property?

Hello,
You shouldn’t need another service if you set RequiresSession=False in your remote data module.

Please read about Event Sinks and Server Callbacks in wiki:
http://wiki.remobjects.com/wiki/Event_Sinks_and_Server_Callbacks

You can also look at File Broadcast sample:
Windows XP: C:\Documents and Settings\All Users\Documents\RemObjects Samples\RemObjects SDK for Delphi
Vista,Win7: C:\Users\Public\Documents\RemObjects Samples\RemObjects SDK for Delphi\

TROEventReceiver.ServiceName - The name of the Service from where events are to be received.
Please read about this component in wiki:
http://wiki.remobjects.com/wiki/TROEventReceiver_Class