This is a discussion on entity bean versus session bean for BMP - Java ; Hi, I have two needs a) cache reference (lookup) semi-static data b) execute my own SQL statements So far for a) entity beans seems to work fine. I assume will have to play with the isolation levels of methods in ...
Hi,
I have two needs
a) cache reference (lookup) semi-static data
b) execute my own SQL statements
So far for a) entity beans seems to work fine. I assume will have to
play with the isolation levels of methods in order to allow for
multiple concurrent readers.
For b) I have been using stateless session beans, which connect to the
database via JDBC and execute SQL as needed.
However this seems like a lot of beans being created unecessarily.
What if I switched those to Entity beans - which have no instance data
but which execute the SQL using local method variables only.
Would that work - can I make those methods Read Uncommitted forcing all
the transaction management to be handled by the database.
Does this make sense?
thanks
Tim