JDO Transaction in Google App Engine
<p>I am reading the following <a href="http://code.google.com/appengine/docs/java/datastore/transactions.html" rel="nofollow">tutorial</a></p>

<p>Take the following code example.</p>

<pre><code>import javax.jdo.Transaction;

import ClubMembers;   // not shown

// ...
        // PersistenceManager pm = ...;

        Transaction tx = pm.currentTransaction();

        try {
            tx.begin();

            ClubMembers members = pm.getObjectById(ClubMembers.class, "k12345");
            members.incrementCounterBy(1);
            pm.makePersistent(members);

            tx.commit();
        } finally {
            if (tx.isActive()) {
                tx.rollback();
            }
        }
</code></pre>

<ol>
<li><p>Does this mean, any code block in between tx.begin and tx.commit, <strong>there will be only one process/thread can access at a time</strong>? Is the tx.being and tx.commit is similar to syncrhonized keyword? But the syncrhonized protection is extended to process level instead of thread level?</p></li>
<li><p>For incrementCounterBy, do we have the explicitly declare the method header as synchronized? This is to ensure in entire web environment, there is only one process can access incrementCounterBy at one time. But, is synchronized protection only applied to thread level? Does synchronized keyword help? Or it is just redundant and we shall solely depend on tx.begin and tx.commit?</p></li>
</ol>
