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.

-
PKUS8E¬Ø¨–†derbyserviceclearenv.batmÐA
Â@нàzÁØImd:        
™¡´«.¤Å]õþ¨EÓºÌ#?|rï�¹˜§éxXÆgáP/ý€¡=ýÎ57h@X“�ˆÚR‰ÿlp¤Æ±Ûì%Ð$ 
Ðl˜e¯¥‡�°Ø*c©$‰8ؤ|GÑAÈUä1ƒç«(VÔY‚Tg¸µ
¯gc6
ïöÞgXûÙܾÐ)Ї>ÀúÙPKFS8E³Ït’,Öderbyserviceenv.bat�Tmo›0þ)ÿUŠö
     
/T­"µ²4LeZmR䀧€#Ûôe¿~@â.%™üîîyß�ÏþB’‚i,˦ši¶óÍõ»ý¢¯¿WŽ·Ôr&™vGêgAdñüh€}7—æêÁt´6z´
 }oð3Ž7é“`¾º¹=áî¶ÈG³cœåW�Óµž¾~Ó�90
Ю¥ÀG‘¢Ô™Ð¸½^ŒÀC-]KÝ{ï�v·]Hø3MÈyòÊvÑ©@ç…³c=³Xœs~©Y´Ö�¬èÍâY€|Ë       
C­Ld=¸‘cE?Q+þ<Ë82Q˜È|TœPHÌOÏ÷óƒSêÞEÑÈ”½Ô#d뇆
±·!ã9À[œô§RžbàùÂøS×{Â-VKÎÊ1Ù@Õ ¸W;þΈKºŽVU¬zÉòœÖ¹ÞOØ`~
m!7›p
ŒÅLj]Ê㡚È3Ѥ¤¤>�Œ•¢‹�Ôn;¡…Ü r}Oi‚â…Wýøþ¡LK?ÑZžá$¡XëGûjDÖÔûÓZP·»[
IK°oHX�Ñd´$Îé·ålK¸¤DÜëö®aâMHR�‚UuwZ@?[Æ¥×Tk 
î*ÿ*˜�púuQ?N±Äk,úTÚA¢©A…kœ“ª?‰ê•“ŠIp#‹ÖC,       
Ìp)È%†å¡äÍ%L_:4Ôª§åeð–pø›N†79IµÏ¶¦<�üPKúŒ7Eñk)í5installservice.bat�S]kƒ0}/ô?”‚O¥:Øsœ:H©576”Ôd.
 MH¢´ÿ~Q¬´ve>Þ{î99÷#9)ËeêpÖL5<gìØ¸bæ3'ŒÒ—Ï}ô9σØóúŽÒwØìz�
Q¦–€ÔFt¡�¯˜¨
x~ê4©�´áPA#¥„ºÄ!ײ$ç©XŽô—‡Gm¬CpeÆe'Ö2™Î—†‹ã
#¤e0Ù9‹qo�ˆe`CÒ·pÛ‚ $Z_^ 
¶>ÆEªÙŸfÈOýØéµQ…3Ô§9Gœ¾ò’�[dÂÔùU»’SËØŠ)öÍOà^­ÅˆùùS­…þw—ÓLwÓ�WhZ¿«Õ¦©’nÛÃÈ”9óYÞð„!Ä…²Úñ½ö|V
     
Ê�Pýh¯ÿPK'_7E_ŽmÍylog4j.properties}�;1„{Áÿ�&�Fm„žoP”;¬Ä"œKŒæ²GÅþwsr‚à£Û�ùf™Õ(Û{&òÌ,Ó(9Z‘î
 Xƒ£ÖÊÈ‘ÒÐ+ÁjEYð0¸†{Ré3ÿ•œ‹s'ê
¼ÕœG¿ H¤‡c>
Ò9p_)-.xôŸ¥—Â{°fö´ÿ$YÍ ¬ShÊ_Óím2éfY×¹Z’$÷
¡žÐz''´kÝI�ÐŒš×Q‹èg(%X>ŒãE\#oo§ÂƒD{a¡ 
£Õ¸´PKDÃB¼¶ÐÚ0Jlogging.propertiesË/J×K,HLÎHÕKÎÏÍÍÏ+ÖËÉOOÏÌK×óÉO·ÍÇ-�™[�Rcâ$ÒS‹PKäS8EïHAeomanageservice.batKNÌÉQHI-Jª,N-*ËLNMÍ+ÓKJ,áåRõr
sŒ÷ð÷uU�IÊÌ‹ÉJÎÏ+ÎÏIU€*´ÊÊ­°*ÊÍ´Ò××ÏÊKÉÔ‡°sò“s2ò‹K¬U]\ƒœ"ãüƒBTõ�ª�
PKS8E{¸zBYmonitorservice.batKNÌÉQHI-Jª,N-*ËLNMÍ+ÓKJ,áåRuq
rŠŒv
ótv�wñR�ASõM/RÐ×w
Ö×G“PàåPKoi7EtÞD\uninstallservice.batKNÌÉQHI-Jª,N-*ËLNMÍ+ÓKJ,áåRuq
rŠŒw�pUUÐ×w     
ÖׇŠ»…y:»ªòr%£kNÎIM,‚›PKUS8E¬Ø¨–† 
derbyserviceclearenv.batPKFS8E³Ït’,Ö 
Ìderbyserviceenv.batPKúŒ7Eñk)í5 
)installservice.batPK'_7E_ŽmÍy 
Žlog4j.propertiesPKDÃB¼¶ÐÚ0J 
‰logging.propertiesPKäS8EïHAeo 
émanageservice.batPKS8E{¸zBY 
}monitorservice.batPKoi7EtÞD\ 
ïuninstallservice.batPKe

Reply via email to