0

*Impl.h file of a service component has these functions:

virtual void OnCreate();
virtual void OnDestroy();

OnCreate is called only when the client makes a call to the service.

I'd like to have it when the server axis2_http_server is launched. (just one instance of my class that receives OnCreate when the whole server is started and OnDestroy when it is stopped)

Staff-WSF service has loadServiceAtStartup by default, but how to make it load my service components too?

Velkan
  • 7,067
  • 6
  • 43
  • 87

1 Answers1

1

To load a service at server startup you must add loadAtStartup metacomment before service class declaration like this:

// *loadAtStartup: true
class MyService: public staff::IService
{

Please see this example for full header code.

loentar
  • 5,111
  • 1
  • 24
  • 25