Hello Tony,


Anton Veretennikov wrote:
> 
> This is a transaction of every session?
> 

I believe that there is some pooling of at least one of
PersistenceManager[s] (PM[s]) and Transaction[s] (TX[s]). Nevertheless, the
code extract I provided will yield a PM and TX unique to the thread (and
therefore the request too in GAE/J) running that code. Your PM and TX will
not leak to another request. I believe that the PersistenceManagerFactory
(PMF) ensures this (if I am wrong, will someone please correct me).



Anton Veretennikov wrote:
> 
> If no, how may i handle this situation:
> 
> When one user is accessing a page i must return data from one entity from
> the datastore, then close it from returning to any other users. What can
> be
> done here?
> 
Do you ask here "How do I ensure that a user cannot see data 'belonging' to
another user"?

Of course, your code will controls what data you exchange with the GAE
datastore, so if it already ensures that some persistent entities are to be
accessed by a specific user only, then this should continue. A different
user calling your persistence code will have a different PM and TX; your
user-specific data exchange should continue to be user-specific.

Just ensure that the PMF is global to your Wicket application instance (a
singleton only is required), and that your data exchange code gets, uses and
closes PMs (using this PMF instance) as and when needed. As for
transactions, the combination of what data exchange you perform, your JDO
settings, and the GAE/J and DataNucleus documentation will determine whether
you need to use a transaction.

If I have not addressed your question Tony, would you please be so kind as
to re-phrase it?

Regards,

Ian
-- 
View this message in context: 
http://old.nabble.com/Wicket-GAE-performance-tp28118591p28141583.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to