Thank you Marten, but:
How can I achieve that? I mean, I'm using annotation driven management for both transactions and EHCache. So, I didn't implement any Aspect nor class annotated with @Aspect by myself. I'm using @Transactional and @Cacheable (that from http://code.google.com/p/ehcache-spring-annotations project) annotations, and they don't support anything about orders, and neither their XML configurations seem to do. Where can I set their orders? My EHCache configuration looks like follows:
Code:
<bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation" value="classpath:ehcache.xml"/>
</bean>
<ehcache:config cache-manager="ehCacheManager">
<ehcache:evict-expired-elements interval="60" />
</ehcache:config>
... and my transactions management configuration:
Code:
<bean id="postgresTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="postgresEntityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="postgresTransactionManager" />
That's all I have. Thank you in advance (again)