[omniORB] nameservice as NT-service and NT alpha port
Dietmar May
dcmay@object-workshops.com
Wed, 8 Apr 1998 23:28:58 -0400
------ =_NextPart_000_01BD6348.696B0B60
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Hi Roland,
> > for our projects we had to set up the omniORB nameservice as nt-
> > service.
We have written a (very) small application which runs omniNames as an NT
service. Exe and C source are included. srvany didn't work for us, so we
wrote a real simple implementation. omninames must be in your path for
the service to work properly. It doesn't have any niceties, like being
able to terminate the naming service process from the Control Panel
Services applet (Stop button) - if you want to do that, set it up to
interact with the desktop in Services applet - nor does it register the
naming service with NT, or itself for that matter - so you'll need the
INSTSRV program, supplied with the NT Resource Kit.
> > The current problem is, that the check (all 15 minutes) doesn't work,
> > but we hope to fix this the next weeks.
> > It seems, that it's a problem of the different thread-model of an
> > nt-service.
> > Each call to omni_thread::self() (e.g. in the readerIn-function in
> > ReadersWritersLock.h)
> > throws an exception. It seems, that the omni_thread::init_t-function,
> > which sets the variable self_tls_index, never get called ...
We have not seen any of these kinds of problems using the attached NT
service code. Of course, that doesn't mean you won't :-)
Hope this is helpful.
Dietmar
------ =_NextPart_000_01BD6348.696B0B60
Content-Type: application/octet-stream; name="SRVNAMES.CPP"
Content-Transfer-Encoding: base64
Ly9saW5rIHdpdGggQURWTElCMzIuTElCDQoNCiNpbmNsdWRlIDxzdGRpby5oPg0KI2luY2x1ZGUg
PHByb2Nlc3MuaD4NCiNpbmNsdWRlIDx3aW5kb3dzLmg+DQoNClZPSUQgV0lOQVBJIEN0cmxIYW5k
bGVyIChEV09SRCk7DQp2b2lkIFdJTkFQSSBTZXJ2aWNlTWFpbiAoRFdPUkQsIExQVFNUUiopOw0K
Y29uc3QgY2hhciogcHpfU2VydmljZUNtZCAgPSAib21uaU5hbWVzIjsNCmNvbnN0IGNoYXIqIHB6
X1NlcnZpY2VOYW1lID0gIm9tbmlOYW1lcyI7DQpTRVJWSUNFX1NUQVRVU19IQU5ETEUgaF9TZXJ2
a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