I really don't understand what's being asked.

You don't manually set an entity group; the rule is the same for
low-level datastore transactions - for any txn, you can only access
one entity group.  You get exceptions when you violate this rule.

An Objectify (class) instance is created with a transactional context.
 Want a new transaction?  Create a new instance.  You can't recycle
them.  If there's something confusing about the documentation, let me
know.

Jeff

On Sat, Apr 23, 2011 at 7:58 AM, Robert Kluin <[email protected]> wrote:
> Hey Matija,
>  I'm not familiar with Objectify's source, but perhaps Jeff could
> suggest a simple / more efficient way to set the connection's entity
> group for Java apps.
>
>
>  For Python apps it is possible to get the transaction connection
> object then 'manually' set the entity group; however, you need to use
> 'internal' methods / attributes to do that (at least with the
> interface I'm familiar with).
>
>
>
> Robert
>
>
>
>
> On Sat, Apr 23, 2011 at 15:59, Matija <[email protected]> wrote:
>> Hi Robert. Bravo. This approach solved problem.
>> We are using objectify and for quick test reason I have used this to set
>> this internal 'connection' entity group:
>> try {
>>      dao.ofy().getDatastore().get(KeyFactory.createKey("Random", new
>> Random().nextLong()));
>> } catch (EntityNotFoundException e) {
>>       // Ignore
>> }
>> Deferred implementation that we use doesn't have access to request headers
>> (but on Monday or Tuesday maybe it will have ;)). There is no reason to use
>> costly random class when task name is unique.
>> Now question is how to set their internal transaction entity group so that I
>> don't need to use one get datastore operation with throwing exception?
>>
>> Tnx, MATijA.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to