That is a lame assumption. The spec requires that we synchronize the cached EJB state with the database before executing a query. Furthermore, the spec allows us to call ejbStore anytime we feel like it.

-dain

On Tuesday, February 11, 2003, at 06:40 PM, Brian Wallis wrote:



The real issue here seems to be that ejbStore() is called either each time a
finder is run or each time the getPlanValue() method is called. If this is
what is happening then it invalidates the assumption that xdoclet is making
in generating the version update code where it puts the increment in
ejbStore().



On Tue, 11 Feb 2003 12:31, Brian Wallis wrote:
I am porting an app from 2.4.4 JBoss to 3.0.4. The app uses xdoclet to
generate various classes, in particular the CMP class for an Entity bean.

It is using the "use-soft-locking" flag in the @ejb.bean tag to generate a
version number field for optomistic locking. The version number is
incremented in the ejbStore() method.

Unfortunatly, ejbStore() seems to be called when the bean is read, so each
time I get a value object back after:

Plan plan = _home.findByPrimaryKey(key);
PlanValue value = plan.getPlanValue();

the version number is different (incremented). Of course I get a "Wrong
Version" exception if I try to store a new value in the plan.

Should this work? As far as I know the application used to work with 2.4.4
JBoss (but I didn't work on it then).

thanks,
brian wallis...



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld  Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to