cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Zeigler <robert.zeig...@roxanemy.com>
Subject Re: Child Contexts
Date Tue, 21 Sep 2010 18:38:18 GMT
Contexts and connections are more or less independent.  There is a pool of connections; there
are one or more contexts.  When a context needs a connection, eg, to write to or read from
teh database, it checks one out from the pool, and returns it to the pool as soon as it is
finished with the connection.

So a child context will share a connection with the parent in the same sense that any data
context "shares" a connection with any other context: via the shared connection pool.

In general, for a child context, /writes/ to the database will be flushed through to the parent,
and therefore performed on the parent-context level.  That's not the case for read operations.

Robert

On Sep 21, 2010, at 9/211:22 PM , brd@holos.pt wrote:

> Hello all,
> 
> Do Child Contexts share the connection of a parent connection? When i do a
> commitChanges on the child the change is made on the database or in the
> parent? I have already read the Nested Contexts page on the User Guide but
> this detail was confusing for me.
> 
> Thank you
> Bruno
> 


Mime
View raw message