Yes. If you need to be able to rollback in case one or more entities don't
get written, you'll need to use transactions. If you use transactions, your
entities must belong to the same entity group or else an exception will be
thrown. You'll get better performance if you do this outside of a
transaction since all entities can be written in parallel but you'll lose
the ability to roll back in case of an individual failure.

- Jason

On Sat, Sep 5, 2009 at 7:18 AM, Vince Bonfanti <vbonfa...@gmail.com> wrote:

>
> Your two "quick notes" seem to be contradictory. In order to use
> transactions, don't all of the entities have to be in the same entity
> group?
>
> Vince
>
> On Fri, Sep 4, 2009 at 8:24 PM, Jason (Google)<apija...@google.com> wrote:
> > Batch puts are supported, yes, and as of yesterday's release, calling
> > makePersistentAll (JDO) and the equivalent JPA call will take advantage
> of
> > this support (previously, you had to use the low-level API).
> >
> > Two quick notes:
> >
> > 1) All of the entities that you're persisting should be in separate
> entity
> > groups since two entities in the same entity group can't be written to
> > consecutively, and you will see datastore timeout exceptions if many
> > simultaneous write requests come in for the same entity or entity group.
> > 2) Batch puts do not operate in a transaction. This means that some
> writes
> > may succeed but others may not, so if you need the ability to rollback,
> > you'll need transactions.
> >
> > - Jason
> >
> > Let me know if you have any more questions on this.
> >
> > - Jason
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to