  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | JSP - A mailing list about Java Server Pages specification and reference | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | RES: batch updates | RES: batch updates 2004-03-29 - By Bernardo Baumblatt
Back Hi Jayaraman,
I have the same problem, but in my case the status can change during my print away and I can only update the printed entities.
The only way is updating one to one, but to increase performance I make my DAO be able to use the executeBacth() method of a PreparedStatement sending all the update in one message to database.
I have good performance in this case.
My two cents, Bernardo Baumblatt. SCJP1.4; SCBCD1.3
-- --Mensagem original-- -- De: An interest list for Sun Java Center J2EE Pattern Catalog [mailto:J2EEPATTERNS-INTEREST@(protected)]Em nome de Jayaraman Dorai Enviada em: quarta-feira, 3 de mar?o de 2004 13:46 Para: J2EEPATTERNS-INTEREST@(protected) Assunto: batch updates
We have a batch process, which runs at the end of the day.
It selects all the invoices which are exported and ready to print. We use a session bean and DAO to fetch all the invoices. Not using the entity bean in this case is fine I believe.
Then after printing all the invoice, we update the status using the DAO directly into the database in one query. Is this ok. Any thoughts? Should I iterate through each entity bean and update them? Updating allt the invoices using DAO through one query seems to be easy to do and also performant. Given that invoices cannot be edited during printing since they are already exported, will there be any issues I should be concerned of.
Thanks Jayaraman
===================================================================Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
===================================================================Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |