wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes ejbStore problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejbStore problem" Watch "ejbStore problem" New topic
Author

ejbStore problem

Jon Ho
Greenhorn

Joined: Sep 03, 2001
Posts: 1
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

Joined: Jun 25, 2001
Posts: 15952
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: ejbStore problem
 
Similar Threads
Please tell I'm doing something wrong and ejbs don't suck that much
Entity Bean ejbCreate method
Entity bean update using ejbStore()
BMT with Entity beans
DB updated on quering the Entity getMethod?