Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ejbStore problem

 
Jon Ho
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
In entity EJBs, I have SQL(update) statements to write to persistent database in ejbStore. My problem is that my container, Weblogic's, calls ejbLoad and ejbStore continuously during the loading of any jsp page. Each jsp simply calls a "select" function from one of the entity ejb. However, Weblogic's performance is degraded tremendously by these database calls. Is it wise to remove the SQL-updates in ejbStore or add a flag in ejbStore to control whether to execute those updates at all?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18028
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's OK to put logic into a bean that tracks when it has been modified and use that to determine whether to do the SQL update in ejbStore. In fact, WebLogic has an extension for CMP beans where the container can call a bean's isModified() method for exactly that purpose.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic