title: Spring @Transactional doesn't work with other annotations?
body: <p>So my Spring education continues. Currently I'm trying to learn some of the annotations and the things they bring to Spring 3. So I've got a mini webapp that can connect to a DB and put stuff in through a form and display records and so on. Everything works fine. I decided to try and get Spring to auto-detect the service bean that I have marked as @Transactional but doing that stops the app from saving to the DB. So:</p>
  
  <pre><code>@Transactional
  public class ReservationServiceImpl implements ReservationService {
  </code></pre>
  
  <p>that works. I have a bean declaration of this class in my springcourt-data.xml files. No problems. When I do this though:</p>
  
  <pre><code>@Transacational
  @Service("reservationService")
  public class ReservationServiceImpl implements ReservationService {
  </code></pre>
  
  <p>it no longer works. And I do have</p>
  
  <pre><code>&lt;context:component-scan base-package="com.springcourt" /&gt;
  </code></pre>
  
  <p>in the springcourt-servlet.xml file. So can anyone tell me what I'm screwing up? All I do is add another annotation to this class and remove the bean definition from the xml file and it no longer saves data to the DB. I can still query records and stuff from the DB though so obviously it's using the autodetected service bean.</p>
  
  <p>Here are the config files:</p>
  
  <pre><code>springcourt-servlet.xml
  &lt;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:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
      http://www.springframework.org/schema/beans 
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/context
      http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"&gt;
  
  &lt;context:component-scan base-package="com.springcourt" /&gt;
  
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /&gt;
  
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
      &lt;property name="webBindingInitializer"&gt;
          &lt;bean class="com.springcourt.web.ReservationBindingInitializer" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/jsp/"/&gt;
      &lt;property name="suffix" value=".jsp"/&gt;
  &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>springcourt-data.xml
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xmlns:p="http://www.springframework.org/schema/p"
  xsi:schemaLocation="
  http://www.springframework.org/schema/beans 
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/tx 
  http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
  http://www.springframework.org/schema/aop 
  http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&gt;
  
  &lt;bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /&gt;
  
  &lt;bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="jpaVendorAdapter"&gt;
          &lt;bean
              class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
              &lt;property name="database" value="MYSQL" /&gt;
              &lt;property name="showSql" value="true" /&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="dataSource"
          class="org.apache.commons.dbcp.BasicDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/test" /&gt;
      &lt;property name="username" value="root" /&gt;
      &lt;property name="password" value="admin" /&gt;
      &lt;property name="initialSize" value="5" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionManager"
      class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;tx:annotation-driven /&gt;
  
  &lt;bean id="reservationService" class="com.springcourt.service.ReservationServiceImpl"/&gt;
  &lt;/beans&gt;
  </code></pre>