Sita Raman Singh wrote:
>
> Hi,
>
> Is there any way to load a number of entity beans (BMP) by doing one
> querry to database? I intend to get all the data for say, 500 entity
> bean in one querry and want to populate 500 entity beans. I want to save
> 500 calls to the database (ejbload for each entity beans).
If you really need to manipulate that number of rows in an EJB
application, you're probably better off doing it from a session bean.
I've done some experimentation with BMP persistence frameworks that
attempt to load rows from the findBy query into a read-ahead buffer,
which is checked in ejbLoad before the database is hit, but there are
problems here with isolating transactions, etc. Some CMP engines do do
this semi-properly (I'm told)
>
> Similarly at the time of storing I dont want to generate 500 ejbstore(),
> instead I want to use batch storing.
That's even tougher than optimizing ejbLoad for BMP. Again, a CMP engine
might be able to do this.
>
> Any comment on how to improve database access preformance will be
> greatly appreciated.
If you are manipulating 500 instances of a class in a transaction,
you're better off at this point implementing that class as a 'dependent
object' rather than an entity bean.
-danch
Confidential e-mail for addressee only. Access to this e-mail by anyone else is
unauthorized.
If you have received this message in error, please notify the sender immediately by
reply e-mail
and destroy the original communication.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user