• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Commons Daemon

 
Shariq Roomi
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic