I have a requirement when I need to save some data in a table, and saving may take some time. Mostly I want to keep a log. I do not want the execution to wait for the continuation.
I know that I need to use threads to complete this task, and I know that it is not recommended to create threads in a corporate application.
So, I started reading about the employee manager and realized and tried the sample program on the websphere 8.5 application server.
I used asynchbeans.jar from websphere and now it bothers me that I am writing specific provider code.
Then I came across the normal api operation, which is described in the oracle java documentation. Now I am going to use commonj api from fabric3.
My doubt is, is there a better way to accomplish the same task? EJB way? Or is a work manager good for my requirement?
source
share