Use EJB to hold a cached object in clustered environment
posted 7 years ago
Hello to all
I need to create a object to hold some cached data for access in a clustered environment, and this object will need to be refreshed from time to time.
Given this requirement, I am wondering if it is good decision decision to use a EJB to hold the object in order to be distributed.
My plan is write a stateless session bean, put the object to hold cached data as it's object variable.
This object's value will be refreshed periodically, while others will access the value by calling its access method.
What I need to know is will the refreshed data take effect on all instances in the cluster (since it is a EJB)?
Also, is this the best decision strategy? or you guys have a better idea to meet the same requirement?