File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes How to devide a task into several parts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "How to devide a task into several parts" Watch "How to devide a task into several parts" New topic
Author

How to devide a task into several parts

shyam sunder prasad
Ranch Hand

Joined: Mar 23, 2011
Posts: 62
i have an application, that application is used to send sms.
so, i am having 500 phone numbers. but i cant send all phone numbers at once to sms class.



so..i want to send the phone numbers only 20 at once to reduce the load and increase the performance.

please help me out how send 20 number periodically ,any job scheduler is there to organize it .

thanks in advance.
Ramon Anger
Ranch Hand

Joined: Apr 19, 2011
Posts: 56

Hi Shyam,

is there a way to check the state of your sms server? READY or BUSY or something that kind?

If so, you could do the following:

1. Write a method. That returns the current state of the sms server.
2. Write a method that returns you the next n sms from your queue.
3. Write a handler that checks periodically the state of the sms server.
If the server is in state READY, get the next n sms and send them to the sms server.
After that, check the state of the sms server again

Best,
Ramon


Blackbelt on BlackBeltFactory.com.
shyam sunder prasad
Ranch Hand

Joined: Mar 23, 2011
Posts: 62
some one told me that there is spring job scheduler to schedule a task periodically one after one another.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to devide a task into several parts