• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Commons Daemon

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to use embedded tomcat in my desktop application.

I need to run tomcat as service on windows desktop. Once user downloads my exe/installer and install it , tomcat should be running.

I am looking at commons daemon project and I downloaded it, it has one jar file and now I can not make sense of it how to use it ?

Please have a look at
http://jakarta.apache.org/commons/daemon/procrun.html

First I thought from where I could get the procrun then some one told me tomcat.exe has procrun in it.

Can some one help me how can I use this commons daemon project and use my aaplication.exe as windows service.

Any help would be appreciated
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Commons Daemon is for Unix systems.

The exe version of Tomcat already gives you the option of installing Tomcat as a windows service.
The .zip version has a batch script in /tomcat/bin for making an existing Tomcat install into a Windows service.
 
Shariq Roomi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben. I was able to install Tom Cat as service via service.bat but then I opened http://localhost:8080/ in my local browser, it did not respond though service uis running.

Steps-

1- Downlaoded TomCat
2- Extracted Tomcat
3- Insatll Tomcat as service via service.bat
4- Run Tom Cat service via Windows Service Manager
5- Open Browser and hit page http://localhost:8080/ and did not get any thing.

Any idea what is going wrong ?? How can I debug this problem ??

One more thing, I am working on desktop application and I want to use embedded tomcat with my application. I was thinking to run my java program using embedded tomcat jars as windows service but this medthod(service.bat) treats only full tomcat. Is there any way, I can install my java application as Windows Service. I have used java service wrapper and I can successfully do that but my manager wants me to explore commons daemon for doing that. We are windows based by the way.
 
Shariq Roomi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay I found the problem. My service actually stopped itself. Any idea ?

logs is

[2007-03-22 15:50:36] [info] Running Service...
[2007-03-22 15:50:36] [info] Starting service...
[2007-03-22 15:50:38] [info] Service started in 1140 ms.
[2007-03-22 15:50:42] [info] Run service finished.
[2007-03-22 15:50:42] [info] Procrun finished.
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic