-
1. Re: JBoss 3.2.2 to JBoss 4.0 DR4 now calls ejbStore ?? ignor
adrian.brock May 31, 2004 11:22 AM (in response to gmatthews)Why do you need the container to invoke isModified() for BMP?
public void ejbStore() { if (isModified()) { ... } }
-
2. Re: JBoss 3.2.2 to JBoss 4.0 DR4 now calls ejbStore ?? ignor
gmatthews May 31, 2004 5:36 PM (in response to gmatthews)I don't need the container to call isModified(), it's just that 3.2.2 does seem to call it, and I wondered why 4.0.0 DR4 now does not.
Is isModified() no longer supported in 4.0.0 ?
Note that I'd also changed my code to how you suggest, but noticed there are a whole bunch of chained interceptor calls leading up to the ejbStore -- and that maybe (guessing here) previously the container might have been able to call isModified and avoid all of that.
I also tried creating a jboss.xml file with read-only methods, but ejbStore is still called even after only a single getValue method has been called on the entity bean. Are there other conditions that must exist in addition to having a jboss.xml file so that ejbStore is not called.
<enterprise-beans>
<ejb-name>myEntityBean</ejb-name>
<method-attributes>
<method-name>get*</method-name>
<read-only>true</read-only>
</method-attributes>
Thanks. -
3. Re: JBoss 3.2.2 to JBoss 4.0 DR4 now calls ejbStore ?? ignor
aloubyansky Jun 1, 2004 2:54 AM (in response to gmatthews)Yes, isModified was lost. It is fixed now.
By the spec ejbStore must always be called at the end of the transaction even on clean instances.
For CMP there is <call-ejb-store-on-clean> element in the jboss.xml. Set it to false to avoid ejbStore invocations on clean instances.