wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Commons Daemon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Commons Daemon" Watch "Commons Daemon" New topic
Author

Commons Daemon

Shariq Roomi
Ranch Hand

Joined: Oct 19, 2004
Posts: 31
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

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Shariq Roomi
Ranch Hand

Joined: Oct 19, 2004
Posts: 31
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

Joined: Oct 19, 2004
Posts: 31
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Commons Daemon
 
Similar Threads
Tomcat as service: how to add heap options
Tomcat5.5
Tomcat as a Windows Service
Tomcat 7.05/Windows 2008 (64bit) issues (solved) (Commons Daemon problem)
tomcat is not starting