Hi,
    I've an application where I need to implement item by item and bulk
updating of entity beans ie in some cases only a few entity beans are
getting modified and in other cases a very large no of entity beans are
getting modifed.

I intend to use commit-option A and since JBoss has pessimistic
concurrency control (one-instance-per-pk and Serialized call I learnt) ,
I am thinking of implementing bulk update of entity beans as follow for
performance reasons.

1. use a BMT session bean and start transaction
2. update all records in the database
3. findByPKs() all entity beans
4. call a business method say, populate() on each entity bean and inside
this method update the state of entity bean. Although this method sets
the state of the bean it doesn't mark that bean as modified and hence
IsModified() method return false (hence it will not be stored again)
5. commit the transaction.

Please comment from a developmental prospective if it will work? What
are the flaws ? Is there any other preferred way to do it ?

Regards,
SRP


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

Reply via email to