This is more of a design question rather than JBoss specific, but I
thought it was a situation that other people have encountered and
was wondering what they did.  I'm sure the answer would be helpful
to others.

I have a table in my db that indicates valid types for one of my
business entities.  They won't change very often, but often enough
that I didn't want to update code everytime changes are made.  I
want to load these types into an object and cache them so that I
don't have to go to the database to retrieve them each time.

In a previous post, there were suggestions for me to use a 
stateless session bean for user transaction recording because
entity beans are expensive and I don't need to keep the bean
around after the transaction is recorded.

Would a stateless session bean make sense here?  I
could keep an internal cache that retrieves data if it is
empty.

As I understand it, a stateful session bean wouldn't make
sense because there is a valid state for each client.
There is essentially only one "state" in this case.

Would an entity bean make sense?  If so, I would probably
use a findAll() method to get all the possible types.
Would JBoss (or other app server) cache all these EJBs
so that next time I call a findAll(), it woudn't go back to the
db for the data?  Would all these EJBs hold too much memory
captive?  The type list isn't very big, but I will have many such lists.

Thanx for your advice.

Norton

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to