Running as a service.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Running as a service.

Stefaan Denolf
Hi,
 
I am trying to run a smalltalk application as a windows service.
I got so far as installing a service, starting and stopping that service.
But when I log off, the service just stops.
Someone any idea why this happens.
I am using vw 7.4.1.
 
mvg
Stefaan
 
 
 
 
Stefaan Denolf
[hidden email]
.....................................................................

MediaGeniX NG
’t Hofveld 6E 3   |   1702 Groot-Bijgaarden   |   Belgium
T  +32 2 467 34 30   |   F  +32 2 467 34 39
http://www.mediagenix.tv
.....................................................................

This e-mail and any files attached with it are confidential and intended only for the use of the individual(s) or entity to whom they are addressed.
If you have received this e-mail by error, please, notify the sender immediately.

 
Reply | Threaded
Open this post in threaded view
|

RE: Running as a service.

Steven Kelly
Message
I'm just getting up and running with installing and starting services using WinService in the public store repository. Here are some problems and how I overcame them (or at least what I did, after which things started working!)
 
1) I was trying to rename visual.exe to myService.exe, to match myService.im, and place it in the same directory with the image. This didn't seem to work. I switched to using vwnt.exe and also copying the vwntoe.dll, in case CCallbacks only work with that version. I made the command line explicitly include the image:
d:\vw\image\vwnt.exe myService.im
 
2) Allowing the service to interact with the desktop and starting it manually showed the VW VM error dialog, that it couldn't find the image. Services start up in one of the Windows directories, and although my image was changing Filename defaultDirectory at startup, that didn't help the VM find the image. I changed the command line to explicitly include the image path
d:\vw\image\vwnt.exe d:\vw\image\myService.im
 
3) With the service set to manually start, and pressing the Start button in the Services Control Panel app, it finally worked. However, when I logged out of my Windows account and logged back in again, the service was still started but the VW headless image was no longer running. headless-transcript.log showed the following, indicating that the service callback in VW had received an event from Windows and shut down (maybe it didn't need to, I still need to check that):
 Received service event: 1
 About to shutdown the application
 Application shutdown finished
 Stopped service: meserver
I set the service to start automatically, and again pressed the Start button. It worked again, and this time after logging out of Windows and logging in again the service was running, and the VW headless image was running. It show up in Task Manager as vwnt.exe, and in Sysinternal's excellent Process Explorer as vwnt.exe under services.exe.
 
The COAST documentation for the Mediator (the service running via WinServiceInterface) says to set the service startup to Automatic. That seemed to be the step that stopped it disappearing when the user who started it logs out.
 
All the best,
Steve
PS If anyone is interested I'm working on extracting the generic parts of the COAST Mediator to serve as a starting point for others wanting to use WinService. My experience so far is that this is a great way to build services in VW, much easier to distribute as a product than requiring srvany.exe and instsrv.exe, and manual steps.
-----Original Message-----
From: Stefaan Denolf [mailto:[hidden email]]
Sent: 24. syyskuuta 2007 15:35
To: [hidden email]
Subject: Running as a service.

Hi,
 
I am trying to run a smalltalk application as a windows service.
I got so far as installing a service, starting and stopping that service.
But when I log off, the service just stops.
Someone any idea why this happens.
I am using vw 7.4.1.
 
mvg
Stefaan
 
 
 
 
Stefaan Denolf
[hidden email]
.....................................................................

MediaGeniX NG
’t Hofveld 6E 3   |   1702 Groot-Bijgaarden   |   Belgium
T  +32 2 467 34 30   |   F  +32 2 467 34 39
http://www.mediagenix.tv
.....................................................................

This e-mail and any files attached with it are confidential and intended only for the use of the individual(s) or entity to whom they are addressed.
If you have received this e-mail by error, please, notify the sender immediately.