Looking into using Hibernate's 2nd level cache. Any tips or pitfalls? Thanks!
On Sun, Feb 24, 2008 at 2:20 PM, Jeromy Evans < [EMAIL PROTECTED]> wrote: > > Cheng Wei Lee wrote: > > What do you'll think of writing a stateful session bean to hold these > data > > and make it gets the data from database once/twice a day? > > > > > I wouldn't use a stateful session bean. It's not really the intent of > them. When used, it's best that they only last a conversation. You'd > also need a lot of them (eg. one per type of lookup data), otherwise > you'll end up with a Repository which is also not a good use of a > stateful session bean. You wouldn't gain much using a stateful session > bean but would have to wear a lot of overhead. > > The concept is sound though - a provider of these objects that is > stateful and polls the database periodically (or is triggered by a > change), but not within a stateful session bean. > If I had a choice though, I would prefer to rely on a cache provided by > the ORM/database/other datasource as you can be sure they're thought > about the issues of optimal cache hits/misses and synchronization. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >