Chapter 15. Asynchronous beans 421
15.4 Development
This section tells you how to develop the sample application using Asynchronous
Beans.
The AppBootstrapBean Startup bean
In this sample application, we want to offload the task of looking up CMP Entity
Beans from the AppBootstrapBean on the main thread of execution.
We create a Work object (InitializeCacheWork). it will invoke the
EntityBeanCacheSingleton, which will in turn do the heavy-duty work of
finding all instances of the entity beans and store the cache in memory.
In order to simulate the data change behavior in our sample application, we
will be implementing an AlarmListener UpdateDbAlarmListener, which will be
called every 30 seconds when an associated alarm fires. The AlarmListener ...