spring - Achieving multi tasking -
how can achieve multi tasking in spring/jpa.
having service perform 2 tasks
- update record
- search record.
these 2 independent task. since there no need 1 wait other task finish.
during research found there @scheduled
can used schedule tasks. here scenario different, solution parallel processing of 2 independent tasks.
which jpa api can used here achieve multi taking?
i think rather relying on jpa apis , use thread pools carry out these tasks. thread1 pool executing search while record updation on thread2. way lot simpler if prefer use other orm frameworks
Comments
Post a Comment