[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

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
>