-
1. Re: Performace tuning and CMP2
davidjencks Apr 19, 2002 8:10 PM (in response to yyi2133)What are you watching? I believe that unless you declare the bean read-only in jboss.xml (this will prevent ejbStore from ever being called), ejbStore will be called when synchronization is necessary but the cmp2 engine checks to see if anything has changed before writing to the database.
-
2. Re: Performace tuning and CMP2
yyi2133 Apr 22, 2002 2:45 AM (in response to yyi2133)Perhaps I've not explained my "problem" clearly.
I know that declaring the bean read-only will prevent every data insert/update. But this is not my purpose. Certainly ejbStore is called whenever synchronization may be necessary.
I'm only trying to understand if JBoss has some performance tuning options to enhance on-memory works. For example you say "cmp2 engine checks to see if anything has changed": how is this performed? How could JBoss know if something has changed in the DB (without reading its data every time) if it is not the only process accessing it? If there were a way to ensure JBoss that it is the only process accessing the DB it should be able to work only in memory whenever it's possible, in the assumption that nobody is changing underlined data meanwhile. In every moment memory could be a partial mapping of the DB.
In a very simple way and some work this is implementable with BMP and a boolean field-status vector... but I was looking for a Container Managed solution. -
3. Re: Performace tuning and CMP2
davidjencks Apr 22, 2002 9:30 AM (in response to yyi2133)The only way to get accurate info from the db when others are changing it behind your (Jboss's) back is to use commit option B or C so the data used in a transaction is reloaded in that transction.
As far as what jboss can notice and control, that is whether you have changed data in an entity, with cmp2 the container manages the data via those abstract accessors, not your entity bean, so it has no problem noticing if you changed something. If you didn't, no db access on ejbStore.