You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Alessandro Manzoni <ma...@gmail.com> on 2014/09/23 13:37:40 UTC

Star Derby as a service

On Derby wiki pages 
(http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to 
install Derby as a service.
It's made by Tanuki wrapper, but I installed succesfully myself the 
service using Apache commons Daemon 
(http://commons.apache.org/proper/commons-daemon/index.html).
Are there some particular reasons not to use commons Daemon?



Re: Star Derby as a service

Posted by Alessandro Manzoni <ma...@gmail.com>.
Il 23.09.2014 15.16, John I. Moore, Jr. ha scritto:
> One minor thought to add to this discussion:
>
> If the main reason for adding Derby as a service is so it will start running whenever
> Windows starts, Windows Task Scheduler can be used for this purpose, and I found it much
> easier to use that Apache commons Daemon.
No, the main reason is to start and stop derby when I need. The big 
advantage of Apache commons Daemon is that enables you to control the 
service (including startup parameters) by a single wonitor window that 
stay silently iconized in the window toolbar. Not that I'm aware of, 
just two different ways to achive the same thing. Feel free to add a 
section on how to accomplish the task with the Apache Commons Daemon. 
Regards,


RE: Star Derby as a service

Posted by "John I. Moore, Jr." <so...@att.net>.
One minor thought to add to this discussion:

If the main reason for adding Derby as a service is so it will start running whenever
Windows starts, Windows Task Scheduler can be used for this purpose, and I found it much
easier to use that Apache commons Daemon.

_________________________________________

John I. Moore, Jr.
SoftMoore Consulting

-----Original Message-----
From: Kristian Waagan [mailto:kristwaa.apache@gmail.com] 
Sent: Tuesday, September 23, 2014 8:41 AM
To: Derby Discussion
Subject: Re: Star Derby as a service

Den 23.09.14 13:37, skrev Alessandro Manzoni:
> On Derby wiki pages
> (http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to
> install Derby as a service.
> It's made by Tanuki wrapper, but I installed succesfully myself the
> service using Apache commons Daemon
> (http://commons.apache.org/proper/commons-daemon/index.html).
> Are there some particular reasons not to use commons Daemon?
>
>
Hi Alessandro,

Not that I'm aware of, just two different ways to achive the same thing.

Feel free to add a section on how to accomplish the task with the Apache
Commons Daemon.


Regards,
-- 
Kristian


Re: Star Derby as a service

Posted by Alessandro Manzoni <ma...@gmail.com>.
Il 23.09.2014 14.40, Kristian Waagan ha scritto:
> Den 23.09.14 13:37, skrev Alessandro Manzoni:
>> On Derby wiki pages
>> (http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to
>> install Derby as a service.
>> It's made by Tanuki wrapper, but I installed succesfully myself the
>> service using Apache commons Daemon
>> (http://commons.apache.org/proper/commons-daemon/index.html).
>> Are there some particular reasons not to use commons Daemon?
>>
>>
> Hi Alessandro,
>
> Not that I'm aware of, just two different ways to achive the same thing.
>
> Feel free to add a section on how to accomplish the task with the Apache
> Commons Daemon.
I' don't know how!
I'm about to explain how I made it.
Apache Daemon is made of few things:
-prunsrv.exe in three version: x86, amd64 and ia64, they are used to 
start the service itself
-prunmgr.exe that starts the monitor window where to modify the service 
parameters and start/stop the service.
I installed these in a service folder inside DERBY_HOME, then I made a 
x86 folder, just to mach %PROCESSOR_ARCHITECTURE% windows env. var, and 
put in it prunsrv.exe, the one that originally was in root dir.
I renamed all prunsrv.exe to the name I want to give to derby service. I 
renamed prunmgr.exe  to match service name too. Theese rename are 
optional, I just like to do!
I made a simple bat to set the env var I need:  derbyserviceenv.bat. 
Another bat to install the service: installservice.bat and one to 
remove: uninstallservice.bat
They are attached with other .bat I made just to be more comfortable: 
monitorservice.bat that just open the daemon monitor window, 
manageservice.bat that jus starts jconsole to see derby Mbeans and 
derbyserviceclearenv.bat to unset env vars.
I put all theese inside DERBY_HOME, at the same level of service dir.
To have logs  of start/stop service activities I put commonslogging.jar 
and log4j.jar into the DERBY_HOME/lib directory and supplied a 
logging.properties and log4j.properties.
All the files are inside derbyservice.zip, I renamed .txt just to trick 
gmail.
That's it.
Hope will be usefull to someone. Feel free to attach to add to wiki 
pages as you prefer. You may treat as a contribution as of apache license.

-

Re: Star Derby as a service

Posted by Kristian Waagan <kr...@gmail.com>.
Den 23.09.14 13:37, skrev Alessandro Manzoni:
> On Derby wiki pages
> (http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to
> install Derby as a service.
> It's made by Tanuki wrapper, but I installed succesfully myself the
> service using Apache commons Daemon
> (http://commons.apache.org/proper/commons-daemon/index.html).
> Are there some particular reasons not to use commons Daemon?
>
>
Hi Alessandro,

Not that I'm aware of, just two different ways to achive the same thing.

Feel free to add a section on how to accomplish the task with the Apache
Commons Daemon.


Regards,
-- 
Kristian

Re: Star Derby as a service

Posted by George Sexton <ge...@mhsoftware.com>.
On 9/23/2014 5:37 AM, Alessandro Manzoni wrote:
> On Derby wiki pages 
> (http://wiki.apache.org/db-derby/DerbyWindowsService) I found how to 
> install Derby as a service.
> It's made by Tanuki wrapper, but I installed succesfully myself the 
> service using Apache commons Daemon 
> (http://commons.apache.org/proper/commons-daemon/index.html).
> Are there some particular reasons not to use commons Daemon?
>
I use the Commons Daemon as part of tomcat, and I've never had any 
problems with it.


-- 
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com