|
|
|
||||||
|
Ice::Service Class in C#?
Just got some free-time again to work on my pet project and I recoded the my network library (which uses Ice) from C++ to C#.
I tell you guys, I really appreciate the support for C#, its really way easier than C++. I was able to recode using a the normal console application which just use the waitForShutdown() function call. So, I kept thinking that converting it into a service would be a snap since it was really easy with C++ when you just use the Ice::Service singleton class. Well, to make my rather winded story short, theres no way I could create a an Ice::Service class. Am I correct in assuming that IceCS.dll does not support the Ice::Service class? Is there a way around this? I would appreciate any suggestions or help. Thanks.
__________________
Alex Rufon jDatabase Development Team jDatabase - a native database for the J programming language |
|
||||||
|
Hi Alex,
You're correct, we don't have a C# version of Ice::Service yet, but it's something we intend to add eventually. Meanwhile, you could start by deriving your own class from System.ServiceProcess.ServiceBase, as described here. Take care, - Mark |
|
|||||
|
Hi Alex,
why don't you simply use iceboxnet? This eventually simplifies your implementation as you don't have to care about the bootstrapping etc. Simply implement your classes and 'go'. regs, Stephan
__________________
Stephan Stapel Software Architect Author of 'Verteilte Internet-Anwendungen mit Ice', ix 07/2005 Author of 'Webbasierte Anwendungen mit IcePHP', ix, 06/2006 |
|
||||||
|
@mes
Yap, I did create a class using the .NET ServiceBase ... unfortunately, there is an added bonus with using the Ice::Service class. You can test your code without loading it as a service first, so no need to recompile. @stephan Thanks for the suggestion ... will give iceboxnet a try. ![]()
__________________
Alex Rufon jDatabase Development Team jDatabase - a native database for the J programming language |
|
|||||
|
Hello Alex,
I am working on a C# Ice windows service currently, using ServiceBase, and Ice.Application. I started with a console app and in my Ice:Application run method I create the communicator, then the object adapter, activate the adapter and then waitForShutdown. When I try the same thing within the context of a service, the service will sort of hang with the waitforshutdown. If I dont waitforshutdown in the run method, seems to work. I was wondering, how did you handle waitForShutdown() within the service? Thanks, Powell |
|
||||||
|
Quote:
I'll be looking into C++.NET as soon as I have free time for my project. What I'm thinking is leaving ICE implementation in C++ but the code will call the C# classes which actually does the work.
__________________
Alex Rufon jDatabase Development Team jDatabase - a native database for the J programming language |
|
||||||
|
Quote:
![]()
__________________
Alex Rufon jDatabase Development Team jDatabase - a native database for the J programming language |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to add servant class | yanhbo | Help Center | 1 | 08-19-2005 04:47 AM |
| Ice.Application class in C# | beardo | Help Center | 9 | 08-09-2005 01:08 AM |
| How to trap signal in ICE::Service Class | dragzhb | Help Center | 6 | 09-15-2004 11:50 PM |
| Operations in Class | yomi | Help Center | 2 | 04-10-2004 10:39 PM |
| bug when pass a class by value | damingyipai | Bug Reports | 2 | 04-02-2004 03:51 AM |