Improve explanation re DAOs and persistence resources (SPR-7339)

This commit is contained in:
Chris Beams 2010-08-07 13:57:01 +00:00
parent 55f2fe7dd5
commit 30b0e5e250
1 changed files with 6 additions and 3 deletions

View File

@ -81,9 +81,12 @@ public class SomeMovieFinder implements MovieFinder {
}</programlisting> }</programlisting>
<para>Any DAO or repository need to access to a persistence resource, <para>Any DAO or repository implementation will need to access to a
depending on the persistence technology used. The easiest way to persistence resource, depending on the persistence technology used; for
accomplish this is to have this resource dependency injected using one of example, a JDBC-based repository will need access to a JDBC
<interfacename>DataSource</interfacename>; a JPA-based repository will need
access to an <interfacename>EntityManager</interfacename>. The easiest way
to accomplish this is to have this resource dependency injected using one of
the <interfacename>@Autowired,</interfacename> the <interfacename>@Autowired,</interfacename>
<interfacename>@Resource</interfacename> or <interfacename>@Resource</interfacename> or
<interfacename>@PersistenceContext</interfacename> annotations. Here is an <interfacename>@PersistenceContext</interfacename> annotations. Here is an