• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Beware of Finders and Getters for CMP in Weblogic

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PPL,
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: 24308
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
HTH
Sahil
 
So I left, I came home, and I ate some pie. And then I read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic