Victor Seal

Greenhorn
+ Follow
since Jan 01, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Victor Seal

Hi, experts, please help!
I need to implement several email broadcast schedulers: some run every 24 hours, some run every 30 days, or 2 weeks, etc.
All these schedulers are started (that's to say, threads are running) in the init(ServletConfig) method of servlet. when the web app is deployed in the Tomcat. The problem is all the schedulers use the email
server and when one hugs the mail service, others can't use it. And other applications also use the same email service, but in the first version, the email service is not synchronized. And problem typically exists the first time all scheduler are started, because all of them need to compete for email service.
I am thinking 2 options:
1. All schedulers implement Runnable. The first time they start running, say if I have 3 broadcast schedulers, the 1st directly uses
email server without waiting, the 2nd Sleeps 2 minutes first, and the 3rd sleeps 4 minutes. But the problem is, as we have more and more users to broadcast,
the 1st scheduler may not be able to finish sending all emails in 2 minutes. So hard coding Thread.sleep(120000) is not a good idea. (this timeout could be read from a property file, but it is still not adaptable)
2. All schedulers extends TimerTask. Then use a Timer object to schedule the TimerTask. But this still needs delay and period as parameters. From the API, it is thread-safe, but I never used it before.
One principle in my application I have to follow is these background threads have to yield to other applications invoked by users in case they compete for email service.
Any suggestions or ideas will be greatly appreciated!
Thanks,
Victor
Nasko, thanks a lot!
18 years ago
Hi, guys, Happy new year!
Sorry for reposting here. I am new member to javarancher. I just passed SCJP 1.4 with a bad score (80%). I am considering taking SCWCD. My JSP and Servlet knowledge mainly comes from coursework. I am using JSP (Struts) in daily work, but my industry experience is almost a blank sheet. How long do I need to prepare for the exam if I expect an 85% grade? 2 months (not full time studying) enough?
Any opinion or suggestion will be deeply appreciated.
Thanks!
Victor
18 years ago
Hi, guys, Happy new year!
I am new member to javarancher. I just passed SCJP 1.4 with a bad grade (80%). I am considering taking SCWCD. But I want to clear some questions before I jump in. Hope you experts can help me
1. What is the real market value of SCWCD? Does it help fresh graduates like me a lot to find a job?( I am sorry, but I know this is not a good question.)
2. My JSP and Servlet knowledge mainly comes from coursework. I am using JSP (Struts) in daily work, but my industry experience is almost a blank sheet. How long do I need to prepare for the exam if I expect an 85% grade? 2 months (not full time studying) enough?
Thanks a lot!
Victor