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

Hi Jan,

   If things are working with Spring non-AspectJ AOP, but not with AspectJ AOP then the problem is likely not with EclipseLink, but in the AspectJ AOP.  The best advice I could give is to post to the Spring Data Access Forum. The Spring team are doing work with EclipseLink so they can probably help.  All of Rob Harrop's Spring/JPA demos at SpringOne this year were built using EclipseLink!

       Shaun

Jan Vissers wrote:
Anybody?

  
Hi,

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).

So:

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

What I'm seeing is that when I have aspectj transaction annotation
enabled, the 'flush()' operation throws a
javax.persistence.TransactionRequiredException:
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.
-J

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

    


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  

--


Oracle
Shaun Smith | Principal Product Manager, TopLink | +1.905.502.3094
Oracle Fusion Middleware
110 Matheson Boulevard West, Suite 100
Mississauga, Ontario, Canada L5R 3P4

GIF image