You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by RamKumar <ra...@tarangtech.com> on 2003/07/02 13:45:50 UTC

How to run as a startup application!!!

Hi All,
         I want to run a java class in a separate daemon thread whenever the tomcat starts.How to do this?.

 This class is neither a servlet nor a Java Main Application. It is plain java class without main(string ar[])  method.

Any idea?..

thanks,
Ramkumar

Re: How to run as a startup application!!!

Posted by John Turner <to...@johnturner.com>.
Yeah, it has "services".  That's where Microsoft got the idea. ;)

John

On Wed, 2 Jul 2003 09:43:36 -0400, Tom Cole <tc...@lamatek.com> wrote:

> I know nothing about Linux. I haven't bought into it... Didn't even know 
> it
> had services.
>
> ----- Original Message -----
> From: "RamKumar" <ra...@tarangtech.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 02, 2003 9:01 AM
> Subject: Re: How to run as a startup application!!!
>
>
>> Hi Tom,
>> thanks for your idea. We should support linux also. In this
> case
>> what should we do?.
>>
>> thanks,
>> -Ramkumar
>> ----- Original Message -----
>> From: "Tom Cole" <tc...@lamatek.com>
>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>> Sent: Wednesday, July 02, 2003 6:18 PM
>> Subject: Re: How to run as a startup application!!!
>>
>>
>> > Once you write your wrapper you can make it a service by using a 
>> program
>> > like JavaService, which I believe can be downloaded at
>> > http://www.alexandriasc.com/software/JavaService/index.html
>> >
>> > Once you have your service created you can modify the registry entry 
>> for
>> the
>> > service under:
>> >
>> > HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Service/<service_name>
>> >
>> > Add a key named "DependOnService" and make it type REG_MULTI_SZ
>> >
>> > To the value list for this key, add the service name for any service 
>> you
>> > want this service to be dependent on (in this case probably just 
>> "Apache
>> > Tomcat 4.1".
>> >
>> > Any questions, drop us a line.
>> >
>> > ----- Original Message -----
>> > From: "RamKumar" <ra...@tarangtech.com>
>> > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> > Sent: Wednesday, July 02, 2003 8:28 AM
>> > Subject: Re: How to run as a startup application!!!
>> >
>> >
>> > > Hi Tom,
>> > >             Could you please more specific on this topic?..How to
>> install
>> > as
>> > > service and how to make it dependent on tomcat?
>> > >
>> > > thanks,
>> > > -Ramkumar
>> > >
>> > > ----- Original Message -----
>> > > From: "Tom Cole" <tc...@lamatek.com>
>> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> > > Sent: Wednesday, July 02, 2003 5:45 PM
>> > > Subject: Re: How to run as a startup application!!!
>> > >
>> > >
>> > > > Write a wrapper with a main class that launches your app, then
> install
>> > it
>> > > as
>> > > > a service, making it dependent on Apache Tomcat service.
>> > > >
>> > > > ----- Original Message -----
>> > > > From: "RamKumar" <ra...@tarangtech.com>
>> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
>> > > > Sent: Wednesday, July 02, 2003 7:45 AM
>> > > > Subject: How to run as a startup application!!!
>> > > >
>> > > >
>> > > > Hi All,
>> > > >          I want to run a java class in a separate daemon thread
>> whenever
>> > > the
>> > > > tomcat starts.How to do this?.
>> > > >
>> > > >  This class is neither a servlet nor a Java Main Application. It 
>> is
>> > plain
>> > > > java class without main(string ar[])  method.
>> > > >
>> > > > Any idea?..
>> > > >
>> > > > thanks,
>> > > > Ramkumar
>> > > >
>> > > >
>> > > >
>> > >
>> ---------------------------------------------------------------------
>> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> > > > For additional commands, e-mail: tomcat-user- 
>> help@jakarta.apache.org
>> > > >
>> > > >
>> > >
>> > >
>> > > --------------------------------------------------------------------- 
>>
>>
>> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> > >
>> > >
>> > >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to run as a startup application!!!

Posted by Tom Cole <tc...@lamatek.com>.
I know nothing about Linux. I haven't bought into it... Didn't even know it
had services.

----- Original Message -----
From: "RamKumar" <ra...@tarangtech.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 9:01 AM
Subject: Re: How to run as a startup application!!!


> Hi Tom,
>             thanks for your idea. We should support linux also. In this
case
> what should we do?.
>
> thanks,
> -Ramkumar
> ----- Original Message -----
> From: "Tom Cole" <tc...@lamatek.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 02, 2003 6:18 PM
> Subject: Re: How to run as a startup application!!!
>
>
> > Once you write your wrapper you can make it a service by using a program
> > like JavaService, which I believe can be downloaded at
> > http://www.alexandriasc.com/software/JavaService/index.html
> >
> > Once you have your service created you can modify the registry entry for
> the
> > service under:
> >
> > HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Service/<service_name>
> >
> > Add a key named "DependOnService" and make it type REG_MULTI_SZ
> >
> > To the value list for this key, add the service name for any service you
> > want this service to be dependent on (in this case probably just "Apache
> > Tomcat 4.1".
> >
> > Any questions, drop us a line.
> >
> > ----- Original Message -----
> > From: "RamKumar" <ra...@tarangtech.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Wednesday, July 02, 2003 8:28 AM
> > Subject: Re: How to run as a startup application!!!
> >
> >
> > > Hi Tom,
> > >             Could you please more specific on this topic?..How to
> install
> > as
> > > service and how to make it dependent on tomcat?
> > >
> > > thanks,
> > > -Ramkumar
> > >
> > > ----- Original Message -----
> > > From: "Tom Cole" <tc...@lamatek.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Wednesday, July 02, 2003 5:45 PM
> > > Subject: Re: How to run as a startup application!!!
> > >
> > >
> > > > Write a wrapper with a main class that launches your app, then
install
> > it
> > > as
> > > > a service, making it dependent on Apache Tomcat service.
> > > >
> > > > ----- Original Message -----
> > > > From: "RamKumar" <ra...@tarangtech.com>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > Sent: Wednesday, July 02, 2003 7:45 AM
> > > > Subject: How to run as a startup application!!!
> > > >
> > > >
> > > > Hi All,
> > > >          I want to run a java class in a separate daemon thread
> whenever
> > > the
> > > > tomcat starts.How to do this?.
> > > >
> > > >  This class is neither a servlet nor a Java Main Application. It is
> > plain
> > > > java class without main(string ar[])  method.
> > > >
> > > > Any idea?..
> > > >
> > > > thanks,
> > > > Ramkumar
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to run as a startup application!!!

Posted by RamKumar <ra...@tarangtech.com>.
Hi Tom,
            thanks for your idea. We should support linux also. In this case
what should we do?.

thanks,
-Ramkumar
----- Original Message -----
From: "Tom Cole" <tc...@lamatek.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 6:18 PM
Subject: Re: How to run as a startup application!!!


> Once you write your wrapper you can make it a service by using a program
> like JavaService, which I believe can be downloaded at
> http://www.alexandriasc.com/software/JavaService/index.html
>
> Once you have your service created you can modify the registry entry for
the
> service under:
>
> HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Service/<service_name>
>
> Add a key named "DependOnService" and make it type REG_MULTI_SZ
>
> To the value list for this key, add the service name for any service you
> want this service to be dependent on (in this case probably just "Apache
> Tomcat 4.1".
>
> Any questions, drop us a line.
>
> ----- Original Message -----
> From: "RamKumar" <ra...@tarangtech.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 02, 2003 8:28 AM
> Subject: Re: How to run as a startup application!!!
>
>
> > Hi Tom,
> >             Could you please more specific on this topic?..How to
install
> as
> > service and how to make it dependent on tomcat?
> >
> > thanks,
> > -Ramkumar
> >
> > ----- Original Message -----
> > From: "Tom Cole" <tc...@lamatek.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Wednesday, July 02, 2003 5:45 PM
> > Subject: Re: How to run as a startup application!!!
> >
> >
> > > Write a wrapper with a main class that launches your app, then install
> it
> > as
> > > a service, making it dependent on Apache Tomcat service.
> > >
> > > ----- Original Message -----
> > > From: "RamKumar" <ra...@tarangtech.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Wednesday, July 02, 2003 7:45 AM
> > > Subject: How to run as a startup application!!!
> > >
> > >
> > > Hi All,
> > >          I want to run a java class in a separate daemon thread
whenever
> > the
> > > tomcat starts.How to do this?.
> > >
> > >  This class is neither a servlet nor a Java Main Application. It is
> plain
> > > java class without main(string ar[])  method.
> > >
> > > Any idea?..
> > >
> > > thanks,
> > > Ramkumar
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to run as a startup application!!!

Posted by Tom Cole <tc...@lamatek.com>.
Once you write your wrapper you can make it a service by using a program
like JavaService, which I believe can be downloaded at
http://www.alexandriasc.com/software/JavaService/index.html

Once you have your service created you can modify the registry entry for the
service under:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Service/<service_name>

Add a key named "DependOnService" and make it type REG_MULTI_SZ

To the value list for this key, add the service name for any service you
want this service to be dependent on (in this case probably just "Apache
Tomcat 4.1".

Any questions, drop us a line.

----- Original Message -----
From: "RamKumar" <ra...@tarangtech.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 8:28 AM
Subject: Re: How to run as a startup application!!!


> Hi Tom,
>             Could you please more specific on this topic?..How to install
as
> service and how to make it dependent on tomcat?
>
> thanks,
> -Ramkumar
>
> ----- Original Message -----
> From: "Tom Cole" <tc...@lamatek.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 02, 2003 5:45 PM
> Subject: Re: How to run as a startup application!!!
>
>
> > Write a wrapper with a main class that launches your app, then install
it
> as
> > a service, making it dependent on Apache Tomcat service.
> >
> > ----- Original Message -----
> > From: "RamKumar" <ra...@tarangtech.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Wednesday, July 02, 2003 7:45 AM
> > Subject: How to run as a startup application!!!
> >
> >
> > Hi All,
> >          I want to run a java class in a separate daemon thread whenever
> the
> > tomcat starts.How to do this?.
> >
> >  This class is neither a servlet nor a Java Main Application. It is
plain
> > java class without main(string ar[])  method.
> >
> > Any idea?..
> >
> > thanks,
> > Ramkumar
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to run as a startup application!!!

Posted by RamKumar <ra...@tarangtech.com>.
Hi Tom,
            Could you please more specific on this topic?..How to install as
service and how to make it dependent on tomcat?

thanks,
-Ramkumar

----- Original Message -----
From: "Tom Cole" <tc...@lamatek.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 5:45 PM
Subject: Re: How to run as a startup application!!!


> Write a wrapper with a main class that launches your app, then install it
as
> a service, making it dependent on Apache Tomcat service.
>
> ----- Original Message -----
> From: "RamKumar" <ra...@tarangtech.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 02, 2003 7:45 AM
> Subject: How to run as a startup application!!!
>
>
> Hi All,
>          I want to run a java class in a separate daemon thread whenever
the
> tomcat starts.How to do this?.
>
>  This class is neither a servlet nor a Java Main Application. It is plain
> java class without main(string ar[])  method.
>
> Any idea?..
>
> thanks,
> Ramkumar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to run as a startup application!!!

Posted by Tom Cole <tc...@lamatek.com>.
Write a wrapper with a main class that launches your app, then install it as
a service, making it dependent on Apache Tomcat service.

----- Original Message -----
From: "RamKumar" <ra...@tarangtech.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 02, 2003 7:45 AM
Subject: How to run as a startup application!!!


Hi All,
         I want to run a java class in a separate daemon thread whenever the
tomcat starts.How to do this?.

 This class is neither a servlet nor a Java Main Application. It is plain
java class without main(string ar[])  method.

Any idea?..

thanks,
Ramkumar



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org