Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Worker Threads: Created by model or by controller?

user12215216Dec 8 2014 — edited Dec 9 2014

Sometimes models needs to access blocking devices, like network cards, databases, files, and so on. This should be done by worker threads or services. But who is in charge of that? The controller or the model itself? I tend to say it is the model, as only the model knows about the fact that it accesses a blocking object. On the other hand, it is said that a model should be a POJO, so it would be the controller's job.

Is there a best practice or general design rule?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2015
Added on Dec 8 2014
3 comments
1,227 views