Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] EclipseLink is ignoring Spring aspectj enabled transaction annotations


I have an issue with Spring aspectj enabled annotated transactions. In
my use case I have an operation that uses straight JPA/EclipseLink code
to persist my entities and mixing this with a 'straight' JDBC operation
- within the same transaction to update the underlying tables (i.e.
streaming a large image as a detail record).


  -> ImageSerie 1:m Image
  -> call entityManager.flush() to 'post' changes
  -> acquire connection bound to thread (via Spring)
  -> update (table) image to stream in blob data

What I'm seeing is that when I have aspectj transaction annotation
enabled, the 'flush()' operation throws a
Exception Description: No transaction is currently active.

The call to entityManager.flush() somehow leads to 'commit' activity
issued by EclipseLink, where it basically shouldn't based on the
transaction semantics set onto it via Spring.

However when using the default - non aspectj - enabled mode, everything
is working fine. I've tried moving eclipselink and persistence jars out
of the WEB-INF/lib folder to the $TOMCAT/lib (Tomcat6 being used) - but
this doesn't have the desired result.

I must be missing something, right?
Help appreciated.

Back to the top