simple examples deamon,service

B

bigbinc

what is the best approach for writing a simple daemon(service in
windows) in java. I need a server to receive requests from a servlet.
It should probably be multi-threaded. I need to also make sure that
the most resources are deallocated, once the servlet has lost its
connection and other GC type stuff.

Also, in windows how do I launch a java service. I did it with JBOSS
a long time ago, but forgot what program and how.

Berlin Brown
(e-mail address removed)
 
S

Sudsy

bigbinc said:
what is the best approach for writing a simple daemon(service in
windows) in java. I need a server to receive requests from a servlet.
It should probably be multi-threaded. I need to also make sure that
the most resources are deallocated, once the servlet has lost its
connection and other GC type stuff.

Also, in windows how do I launch a java service. I did it with JBOSS
a long time ago, but forgot what program and how.

Berlin Brown
(e-mail address removed)

I just instantiate a ServerSocket in the main method and wait on
an accept call. Every time I get a connection I just fire up a
new Thread to handle it. I could send you some sanitized code if
you really need it.
 
B

bigbinc

Sudsy said:
I just instantiate a ServerSocket in the main method and wait on
an accept call. Every time I get a connection I just fire up a
new Thread to handle it. I could send you some sanitized code if
you really need it.
Could you send?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top