First I thank very much for the replies. Please continue forward
instruction.
this service, written in Java,  will serves two applications: one is online
with Tomcat, and another one is an offline application. these two
applications will sometimes update the same data tables. This service will
provide unique keys, and do something else for these two applications.

This service will not depend on if Tomcat is running or not.
I want this service on UNIX runs automatically when the computer is started,
and keep running.

Thanks.

-----Original Message-----
From: John Najarian [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 8:35 PM
To: 'Tomcat Users List'
Subject: RE: How to create/run a Java Service on UNIX


It's very easy to launch a Java daemon in Linux/Unix.
It used to be difficult & require some JNI programming.
On the GNU site I found a slick way someone wronte in
Java and it is simple.  What I wanted to know from the
person asking the question is what they're trying to do
with the 'Service'. 'Service' this is Unix not winblows.
Get with the correct lingo! - LOL!

-----Original Message-----
From: John Gentilin [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 7:08 PM
To: Tomcat Users List
Subject: Re: How to create/run a Java Service on UNIX

Sorry, missed the beginning of this thread but..

I have this book
http://half.ebay.com/cat/buy/prod.cgi?cpid=282172&meta_id=1
and I use it often. It has a very good section on how to create a single or
multi threaded server. It does not go into how to launch this process as
a daemon thread under Unix. I think all you really need to do is launch the
process as a background task by appending the & to the end of the
command line.
Look at the tomcat Catalina.sh as an example of a startup script to run the
service in the background.

HTH
-John G

Daxin Zuo wrote:

>The program is written as Java class. Does it requires special functions?
>How to make it a service, keep running and ready to provid data?
>Thanks.
>
>-----Original Message-----
>From: Mike Curwen [mailto:[EMAIL PROTECTED]
>Sent: Thursday, September 09, 2004 3:30 PM
>To: 'Tomcat Users List'
>Subject: RE: How to create/run a Java Service on UNIX
>
>
>So you've already written this java program, and it has a public static
void
>main() method, and it all interfaces properly with what you need it to, and
>you just want to know how to make it start when your UNIX box starts?
>
>Or you haven't written the program yet at all, and you want to know how to
>go about doing so?
>
>
>
>
>>-----Original Message-----
>>From: Daxin Zuo [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, September 09, 2004 5:19 PM
>>To: Tomcat Users List
>>Subject: RE: How to create/run a Java Service on UNIX
>>
>>
>>Yes. It keep running and sometimes it replies and provides
>>some data for other applications.
>>
>>-----Original Message-----
>>From: John Najarian [mailto:[EMAIL PROTECTED]
>>Sent: Thursday, September 09, 2004 2:59 PM
>>To: 'Tomcat Users List'
>>Subject: RE: How to create/run a Java Service on UNIX
>>
>>
>>Do you want to run this as a daemon?
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to