Results 1 to 6 of 6
Thread: Check email by background thread
- 10-20-2008, 01:24 AM #1
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
Check email by background thread
hello..
I need some advice or directions, how to make a web application which will check email every 10sec by thread and work some basic background job, depends of email contents.. (update database)
And after that show results in browsers..
Maybe I need make that with servlet ??
- 10-20-2008, 01:50 AM #2
You could make it a servlet, but lets back up a notch.
Most things that alert on email run on the client. Could be a laptop, desktop, blackberry, iPhone, etc. Its the client that can easily display things to the user, ring bells, make sounds, etc.
Its not clear what the "web application" would do. Email is kept on a server, and most folks pull it down to their local machine to read the messages.
Are you sure you want to use these terms: servlet, web application, etc.?
- 10-20-2008, 09:36 AM #3
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
Yes, I must use email check on server side, every 10, od 20 sec in background, depends of email contents update some elements of database.
Its not problem work with email, my problem is how to run some background job every 10 sec in servlet, after deploy on GlasshFish. Because complete solution will be web application that communicate with other web service (or web pages), and collect data from them, and update database with collected data.
- 10-20-2008, 07:39 PM #4
If I was the sysadmin for the mail server, and I found your code checking every 10 seconds, I'd strangle you.
Its trivial to setup a daemon thread in Java and run it under any controller, Glassfish, Tomcat, JBoss, etc.
What is your problem?
- 10-21-2008, 09:13 AM #5
Member
- Join Date
- Oct 2008
- Posts
- 4
- Rep Power
- 0
I now! I due the same!
But I'm a student, and for part of project solution we need to make 2 web services that communicate with email (what is ridiculous), best way to due this is with wsdl, but user request is to work with email and due some background jobs depends of command included in message.
Second part of first web service is to check weather wsdl every 10min, and update local database..
So.. my question still is how to run background thread every 10sec (min)? What is best solution...? Some advice, except to change user request, but that is not on me! :rolleyes:
thx ;)
- 10-21-2008, 03:16 PM #6
Similar Threads
-
send email using apache commons email
By jnamendi in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-14-2008, 05:55 PM -
passing a value from parent thread to child thread
By sachinj13 in forum Threads and SynchronizationReplies: 7Last Post: 09-07-2008, 09:06 PM -
data from the main/GUI thread to another runnin thread...
By cornercuttin in forum Threads and SynchronizationReplies: 2Last Post: 04-23-2008, 10:30 PM -
If JNI thread call the java object in another thread, it will crash.
By skaterxu in forum Advanced JavaReplies: 0Last Post: 01-28-2008, 07:02 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks