I am using Websphere Application Server to create a typical web application where UI is JSPs, there is a Controller and a session EJB and a Database. I implemented a notification system which runs in the backround as a separate thread. I used WorkManager for that purpose.
My problem is, I want to start the WorkManager without having to create a session or an EJB instance for every single of the parallel sessions started by different users. It should not be session based.
Right now, the WorkManager thread kicks off when the EJB is instantiated, so if there are 3 connections, there are 3 WorkManager instances.
Would singleton session bean be a good idea? or is there somewhere I can put a ‘main()’ method which will be called, or something similar?
Any ideas would be appreciated.
I think that you have several options: