title: Is a Spring Data (JPA) Repository thread-safe? (aka is SimpleJpaRepository thread safe)
body: <p>I am using a <a href="http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/repositories.html#repositories.core-concepts" rel="noreferrer">Spring Data (JPA) repository</a> to take care of CRUD boilerplate.</p>
  
  <p>I define my repository interface like so:</p>
  
  <pre><code>import org.springframework.data.repository.CrudRepository;
  
  public interface FooRepository extends CrudRepository&lt;Foo, Long&gt;
  {
    public Foo findByXAndYAndZ(X x, Y y, Z z);
  }
  </code></pre>
  
  <p>Spring then auto-magically generates me an implementation of said interface.  What we get back is a proxy, but I believe that eventually we get down to a <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository</code>.</p>
  
  <p>A <code>JdkDynamicAopProxy</code> is thread-safe <em>if</em> the underlying target class is thread-safe.  The question therefore is: is <code>SimpleJpaRepository</code> thread safe?</p>