I've been using a Spring + Atomikos + Hibernate(MySQL) + ActiveMQ configuration which worked fine, until I ran into a situation where I had to add a @Transactional method to a class that was @Configurable.
At that point, I ran into the incompatibility of mixing aspect-weaving with spring-proxying, which led to this exception:
In this forum, it was suggested that I switch to using "aspectj" mode for the transaction management, which I did by using:
java.lang.IllegalStateException: Post-processor tried to replace bean instance of type [some.class.name] with (proxy) object of type [org.springframework.beans.factory.aspectj.$Proxy68] - not supported for aspect-configured classes!
However, when I try to send a JMS message I now get a complaint from Atomikos claiming:
mode="aspectj" proxy-target-class="false" />
Has anyone ever used aspectj-mode successfully with Atomikos?
com.atomikos.jms.AtomikosTransactionRequiredJMSException: The JMS session you are using requires a JTA transaction context for the calling thread and none was found.
Please correct your code to do one of the following:
1. start a JTA transaction if you want your JMS operations to be subject to JTA commit/rollback, or
2. increase the maxPoolSize of the AtomikosConnectionFactoryBean to avoid transaction timeout while waiting for a connection, or
3. create a non-transacted session and do session acknowledgment yourself, or
4. set localTransactionMode to true so connection-level commit/rollback are enabled.
... 49 more