My initial reaction was "Oof, good god no!" The performance drag of all 
of those writes would be horrible.

Looking at the interaction diagrams in the spec, the commit protocol 
diagrams show ejbStore happening in 'beforeCompletion', i.e. only at 
commit. Other diagrams merely show store happening at some point after a 
business method is called. The text may be more specific, but I haven't 
time to hunt right now.

-danch

Bill Burke wrote:

> All,
> 
> We have the following (bad?) assumption in our application code:
> 
> ----------------------------
> begin transaction
> 
> Bean b = findByPrimaryKey(...)
> System.out.println("flag = " + b.getFlag()); // prints flag = 1
> b.setFlag("0")
> 
> Enumeration = findByAllBeansWithFlagEqualToOne(....) // where flag = '1'
> 
> // We assume Bean b is not in the Enumeration, but it is.
> 
> end transaction
> ----------------------------
> 
> My question to you guys is,
> 
> Should storeEntity be called after every Entity method invocation?  Right
> now, a database update only happens when the Entity is commited.  What does
> the spec say on this?  I can't find anything at the moment.
> 
> 
> Thanks in advance,
> 
> Bill
> 
> 
> --
> This is the JBossCMP mailing list. Please send email to '[EMAIL PROTECTED]'
> with the command 'unsubscribe jbosscmp [email@address]' in the body of the mail
> to be removed from this list.



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to