1 Reply Latest reply on Jun 28, 2017 3:37 AM by gareth.ferrier

    Issue with Spring Transactions in Jive Plugin - Resolved

    Ryan Rutan

      In short, when you are using the @Transactional annotation in your code, make sure that you have your pom.xml setup to weave in transactions correctly at COMPILE time.  This is an easy yet painful oversight! =)

       

      Below is a snippet (as of 5.0.0.1) that works in your pom.xml.  The one generated from the Maven: How To Create a New Maven Project  didn't have the aspect libraries declaration for Spring and as a result....transactions were being ignored.

       

      Happy to provide some more context if others need it...but thought I'd share before I forgot.

       

       

      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>aspectj-maven-plugin</artifactId>
      <version>1.3</version>
      <dependencies>
      <dependency>
      <groupId>org.aspectj</groupId>
      <artifactId>aspectjtools</artifactId>
      <version>1.6.9</version>
      </dependency>
      </dependencies>
      <configuration>
      <aspectLibraries>
      <aspectLibrary>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aspects</artifactId>
      </aspectLibrary>
      </aspectLibraries>
      <source>1.6</source>
      <target>1.6</target>
       <showWeaveInfo>true</showWeaveInfo>
      </configuration>
      <executions>
      <execution>
      <goals>
      <goal>compile</goal>
      <goal>test-compile</goal>
      </goals>
      </execution>
      </executions>
      </plugin>