Java service for queuing tasks