-
1. Re: Many ejbStore calls
michel1 Dec 13, 2001 3:52 PM (in response to michel1)Found some pointers on the web which explained that adding a method
public boolean isModified()
to ejb implementation class helps.
It should return true if the state has changed. JBoss 2.4.x does not store the ejb if the state has not changed. -
2. Re: Many ejbStore calls
markd Dec 14, 2001 9:49 AM (in response to michel1)You can also specify <tuned-updates>true</tuned-updates> in jaws.xml. Either as the default or for each entity bean. <tuned-updates> acceessed whether the bean has changed or not. For us, using Jboss 2.2.1, 2.4.0, and 2.4.3, setting this eliminated the multiple calls to ejbStore without implementing the isModified()
-
3. Re: Many ejbStore calls
lexus Jan 23, 2002 9:08 AM (in response to michel1)But <tuned-updates>true</tuned-updates> doesn't work in jboss 2.4.4. Is there any replacement or workaround for CMP beans? isModified() is non-standart.
-
4. Re: Many ejbStore calls
dsundstrom Jan 29, 2002 3:28 PM (in response to michel1)The problem is that you transactions are to small. When each transaction completes the container must sync the entity with the database. Assuming that you have tuned updates on, persistence engine checks each field to see if the value has changed, and if it has it will store the value in the database.
A common problem occurs when a web interface loads form input into an entity. Programmers commonly forget to wrap these sets with a transaction, so you get one transaction for each field in your form.