This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, Does anyone have any thoughts on what the best way to ensure an application initialization process starts off when the application loads or is first accessed?
I have the need to create a simple global cache and thread for persisting the cache and I need it to be readily available as early as possible.
The only way I could think to accomplish this would be to implement an interceptor to put in the interceptor stack of every action, and then put a check in there to see if my init process has run, prior to any actions being executed.
This solution seemed inherently crappy. haha... Anyone have a better way of doing this so I don't have to intercept every single action for the life of the app when I only need to run the process the first time?