Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Beware of Finders and Getters for CMP in Weblogic

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yesterday i discovered one awful thing about Finders and getters for CMP. We are using Weblogic 4.5.1. I ran a finder on a table which returned 10 rows in an enumeration. There were around 10 fields in the table. When i actually used the getters for getting the field values, I found out to my dismay that each get involved in the bean updating the table for that row ( God knows why this should happen. I was doing a simple select on the table only). In oracle i added a trigger to that table to insert into a log table, everytime an update happens to this table. After find and get, I found out that log table had 318 rows inserted, meaning 318 updates had happened to this table. No wonder entity beans are so slow. Anyone, any idea as to why this should happen? Iam seriously thinking now, to scrap all entity beans and to go for session beans with Connection Con. So all you entity bean buffs out there, Think again.
Saloon Keeper
Posts: 22289
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that if you tag the bean as read-only you'll eliminate a lot of that overhead.
As far as the database being UPDATED on a GET, that doesn't sound right. I can understand it being done on a SET for each field, though, since WebLogic is a clusterable server.
BEA's own EJB newsgroups have featured some discussions lately on what does and doesn't cause database traffic. You might want to join in.
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prem,
I guess u would be knowing about the isModified method, if u supply that method in the DD, the calls to ejbStore can be minimized(Update). This is a very widely discussed problem in the WL Developers circle and the soln is pretty well known as of today.
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic