anchor.diff:  . let repositories extend `org.appng.persistence.repository.QueryDslSearchRepository`
   . use `org.appng.persistence.repository.QueryDslSearchRepositoryImpl` as `base-class` of `<jpa:repositories>`
   
  -The repository then implements {spring-data}/api/org/springframework/data/querydsl/QueryDslPredicateExecutor.html[org.springframework.data.querydsl.QueryDslPredicateExecutor^]+The repository then implements {spring-data}/api/org/springframework/data/querydsl/QueryDslPredicateExecutor.html[org.springframework.data.querydsl.QueryDslPredicateExecutor^]
  
positive.code: }
  ----
  
  . In your `beans.xml`, add the following configuration:
  +
  [source,xml]
  ----
  <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  	xmlns:context="http://www.springframework.org/schema/context"
  	xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  	xmlns:tx="http://www.springframework.org/schema/tx"
  	xsi:schemaLocation="http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans.xsd
         	http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context.xsd
          http://www.springframework.org/schema/tx
         	http://www.springframework.org/schema/tx/spring-tx.xsd
          http://www.springframework.org/schema/data/jpa
          http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">
  
    <context:component-scan base-package="com.myapp" />
    
    <jpa:repositories base-package="com.myapp.repository"
        base-class="org.appng.persistence.repository.SearchRepositoryImpl" /> <!--1-->
  	
    <tx:annotation-driven /> <!--2-->
  
    <bean id="transactionManager"
      class="org.springframework.orm.jpa.JpaTransactionManager" /> <!--3-->
  
    <!--4-->
    <bean id="entityManagerFactory"
        class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  	<property name="persistenceProviderClass"
  	  value="org.hibernate.jpa.HibernatePersistenceProvider" />
  	<property name="persistenceUnitName" value="myapp"/> <!--5-->
  	<property name="dataSource" ref="datasource" /> <!--6-->
  	<property name="jpaVendorAdapter">
        <bean
            class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
  	</property>
  	<property name="jpaProperties"> <!--7-->
  	  <props>
  		<prop key="hibernate.show_sql">${hibernateShowSql:true}</prop> <!--8-->
  		<prop key="hibernate.format_sql">${hibernateFormatSql:false}</prop>
  		<prop key="hibernate.id.new_generator_mappings">false</prop>
  	  </props>
  	</property>
  	<property name="packagesToScan"> <!--9-->
  	  <list>
  		<value>com.myapp.domain</value>
  	  </list>
  	</property>
    </bean>
    <bean id="entityManager"
          class="org.springframework.orm.jpa.support.SharedEntityManagerBean" />  <!--10-->
  </beans>
  ----
  <1> Enable Spring Data JPA repositories, defining the `base-package` where your repositories reside. As a `base-class`, use `org.appng.persistence.repository.SearchRepositoryImpl`.
  <2> Enable annotation based transaction management (using {spring}/javadoc-api/org/springframework/transaction/annotation/Transactional.html[org.springframework.transaction.annotation.Transactional^]).
  <3> Define a transaction manager.
  <4> Define an `EntityManagerFactory`.
  <5> Choose a meaningful name for the persistence unit.
  <6> The referenced bean `datasource` of type `javax.sql.DataSource` <<app-datasource,is provided by the platform>>.
  <7> Define the JPA properties.
  <8> Use some application-properties, also provide a default value.
  <9> Define the package(s) where your entities reside.
  <10> Define an `javax.persistence.EntityManager`.
  
  . Inject the repositories into your service class(es) and annotate them with  `@org.springframework.transaction.annotation.Transactional`:
  +
  
negative.code: === Using JPA
  An application can easily make use of http://projects.spring.io/spring-data-jpa[Spring Data JPA^] for implementing the data access layer. See the {spring-data-jpa}/reference/html/[Reference Documentation^] for more details.
  
  IMPORTANT: If you add JPA capabilities to an application that is already assigned to a site, 
  you first need to remove the applicaton from the site. Then deploy the new application archive and assign it to the site again.
   This only needs to be done once.
  
  If your application want's to use JPA, follow these simple steps:
  
  