title: Spring transaction annotation not working
body: <p>I'm using Spring 3.2.4 with JavaFX and wanted to implement a method, where the operations will be performed in a transaction. My code in the controller looks like this:</p>
  
  <pre><code>@Transactional(rollbackFor = { ServiceException.class,
              ValidationException.class })
      public void registerVolunteer(User user, Volunteer volunteer)
              throws ServiceException, ValidationException {
          User ret = userService.create(user);
          volunteer.setUser(ret);
          volunteerService.untransactedCreate(volunteer);
      }
  </code></pre>
  
  <p>And my application-context: </p>
  
  <pre><code>&lt;tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/&gt;
  
      &lt;!-- Transaction Manager --&gt;
      &lt;bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Trying to run this, I get this error message:</p>
  
  <pre><code>Controller method "onBackClicked" not found.
  /home/workspace/project/NewProject/target/classes/fxml/RegisterVolunteer.fxml:69
    at javafx.fxml.FXMLLoader$Element.processEventHandlerAttributes(FXMLLoader.java:497)
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:594)
    at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2472)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2177)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2069)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:97)
    at org.impactvolunteers.management.FXMLSpringLoader.load(FXMLSpringLoader.java:81)
    at org.impactvolunteers.management.gui.Screen.init(Screen.java:50)
    at org.impactvolunteers.management.gui.ScreensController.init(ScreensController.java:43)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    ...
  </code></pre>
  
  <p>The method exists. With either removing the annotation, or changing the method from <code>public</code> to <code>private</code> or removing the bean from the config, the program runs but the <code>@Transactional</code>-annotation simply would not work. Removing <code>proxy-target-class="true"</code> leads me to another error.</p>