Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > can you give me any hint for writing a background java program?

Reply
Thread Tools

can you give me any hint for writing a background java program?

 
 
Garg
Guest
Posts: n/a
 
      11-11-2006
Hi All,

I a write a process in java which will run in the background.

Can you give me any hint for this or any sample code.

thanks in advance,
Tarun Garg

 
Reply With Quote
 
 
 
 
Karl Uppiano
Guest
Posts: n/a
 
      11-11-2006

"Garg" <> wrote in message
news: oups.com...
> Hi All,
>
> I a write a process in java which will run in the background.
>
> Can you give me any hint for this or any sample code.
>
> thanks in advance,
> Tarun Garg


Do you mean a service or daemon without a console or UI? Or just a thread
that does some processing in the background of a Java application?


 
Reply With Quote
 
 
 
 
Garg
Guest
Posts: n/a
 
      11-11-2006
Thanks for Reply,

Basically requirement is to write a process which runs 24*7 and monitor
some conditions in the database and it has to send out a mail if that
condition is fullfilled.
so please suggest me what will be the best way.

Thanks in advance,
Tarun Garg

On Nov 11, 11:20 am, "Karl Uppiano" <karl.uppi...@verizon.net> wrote:
> "Garg" <sendtog...@gmail.com> wrote in messagenews: ooglegroups.com...
>
> > Hi All,

>
> > I a write a process in java which will run in the background.

>
> > Can you give me any hint for this or any sample code.

>
> > thanks in advance,
> > Tarun GargDo you mean a service or daemon without a console or UI? Or just a thread

> that does some processing in the background of a Java application?


 
Reply With Quote
 
Karl Uppiano
Guest
Posts: n/a
 
      11-11-2006

"Garg" <> wrote in message
news: oups.com...
> Thanks for Reply,
>
> Basically requirement is to write a process which runs 24*7 and monitor
> some conditions in the database and it has to send out a mail if that
> condition is fullfilled.
> so please suggest me what will be the best way.
>
> Thanks in advance,
> Tarun Garg
>


Thanks for clarifying. Without getting into specifics, you just need to
write a console Java application to do this. That is, no Swing, no AWT, just
a program that starts with void main(String[] args). You just code it to run
forever. If you need to check something periodically, you might consider
using java.util.Timer. You will need to use JDBC or other database access
library to monitor the database. You will probably need to use the JavaMail
API to send mail. Refer to the Java API documentation for details. It is all
I usually need.

If you need your application to start automatically, and run as a service in
Windows, you will need to use one of the many Java service runners that let
you run Java as a service. Google "Java Windows Service". Alternatively, you
can run your application as a daemon with a simple shell script. Google
"Java Unix daemon".

This project uses a number of Java technologies. You might have to download
JavaMail from java.sun.com and possibly JDBC drivers from third party
vendors. Using Google, I think I rounded up everything a person would need
for this in less than 15 minutes. Google is your friend.


 
Reply With Quote
 
Garg
Guest
Posts: n/a
 
      11-13-2006
Hi karl,

thanks for the suggestion,

I think for writing a thread will be a good option.

or do you suggest me any thing else.

Thanks
Tarun Garg

Karl Uppiano wrote:
> "Garg" <> wrote in message
> news: oups.com...
> > Thanks for Reply,
> >
> > Basically requirement is to write a process which runs 24*7 and monitor
> > some conditions in the database and it has to send out a mail if that
> > condition is fullfilled.
> > so please suggest me what will be the best way.
> >
> > Thanks in advance,
> > Tarun Garg
> >

>
> Thanks for clarifying. Without getting into specifics, you just need to
> write a console Java application to do this. That is, no Swing, no AWT, just
> a program that starts with void main(String[] args). You just code it to run
> forever. If you need to check something periodically, you might consider
> using java.util.Timer. You will need to use JDBC or other database access
> library to monitor the database. You will probably need to use the JavaMail
> API to send mail. Refer to the Java API documentation for details. It is all
> I usually need.
>
> If you need your application to start automatically, and run as a service in
> Windows, you will need to use one of the many Java service runners that let
> you run Java as a service. Google "Java Windows Service". Alternatively, you
> can run your application as a daemon with a simple shell script. Google
> "Java Unix daemon".
>
> This project uses a number of Java technologies. You might have to download
> JavaMail from java.sun.com and possibly JDBC drivers from third party
> vendors. Using Google, I think I rounded up everything a person would need
> for this in less than 15 minutes. Google is your friend.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone give hint on the exam quest????70-271 Sal - from the fiji Islands MCDST 4 08-27-2004 10:46 AM
RE: newbie: confused with example in Learning Python 2nd Edition:cananyone give a hint Robert Brewer Python 4 08-24-2004 06:40 AM
newbie: confused with example in Learning Python 2nd Edition: can anyone give a hint Porky Pig Jr Python 3 08-24-2004 04:02 AM
can anyone give me a hint Robert MCSD 0 08-11-2004 05:49 PM
More confused than ever. Please give me a hint. Daniel Pope Java 5 02-22-2004 04:20 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57