• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Commons Daemon

 
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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.
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic