I promise this goes beyond the beating of the proverbial dead horse although my inspiration to write about Sun Java System Application Server Windows services support originally came from here. While Sharan's Windows services support blog entry stated the facts, I would really like to elaborate on the history behind it and (dare I hope?) get some input from actual Sun Java System Application Server users.
So, the starting point of this tale is Sun Java System Application Server 7.x. This release borrowed good chunk of its server instance implementation from corresponding SunONE Web Server implementation. This meant that there was a decent amount of good old native code involved and on Windows platform it also meant that for each admin server and server instance that was created you automatically got Windows service associated with it (no questions asked and no two ways about it!). Apparently, some people liked it that way. On the other hand, there were definite downsides to this:
- Only users with Administrator privileges were able to install the server and create new domains and instances.
- Apparently, there are still Windows users out there whose idea of uninstallation is to wipe out the content of the installation directory. Since Windows services are left behind in the process, such user could not reinstall until zombie service entries were also cleaned up.
- Naming schema used for service names did not allow for multiple installations on the same system.
Fast forward to 2003. Planning for 8.x release going on and in come two Platform Edition requirements that will affect services support: we have to support non-Administrator installation on Windows platforms and we have to get rid of as much native code as humanly possible. I guess you can see where this is going... So, for Platform Edition, the end result is new, pure Java server instance creation process. Windows services do not get created anymore (and very few people seem to mind). Well, as it turned out, some people do mind (and speak their mind in forums), and for Standard and Enterprise Editions of the product which are definitely oriented to larger production environments, at least some level of Windows services support is important. At this point we officially document a way to create Windows services using sc.exe utility.
Fast forward again to present time. As the first step in Windows service support "get well" plan, Sun Java System Application Server 9 Platform Edition Beta (coming soon!) installer will in fact ask user (provided that user is an Administrator) whether they want Windows service associated with their default server. Behind the scenes, installer will automate steps described in the above mentioned document and call sc.exe utility. Bad news is that Windows services creation for any additional server created after the installation is performed will still have to be done manually.
My belief is that eventually we need to get to the point where Windows services are created (or not, as specified by the user - so that everyone is happy!) at the server creation time, i.e. as soon as you run asadmin create-domain command. I am sorry if the previous sentence sounds like stating the obvious but so far we have run into wildly differing opinions on what is the exact importance of this feature. One thing that would help pushing this forward is to find out how many people out there actually need/want/cannot live without Windows services support and why. If you have any input on this please go ahead and add a comment!