Rajdeep Biswas wrote:Yup, please explain more. From the little understanding that I got, I think both threads are not doing inter-thread communication properly, or probably you needed to implement some polling mechanism against some state of your services. If you are knowing what you are trying to accomplish, BlockingQueue might be a good option too.
Tim Moores wrote:Observer and Observable go back to the early days of Java; I wouldn't use them for anything at this point.
Stephan van Hulst wrote:If you're using an application container, you can usually inject your classes without having to resort to static variables.
What framework are you using?
Uh oh, we're definitely being carded. Here, show him this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|