vipx / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

jpa: Object-methods like finalize become transactional, if the Type is annoptated @Transactional #788

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the issue:

Steps to reproduce:
1. Annotate a given Type as @Transaction (not on method, but on type level)
2. Once the object gets finalized, the Interceptor kicks in

at 
com.google.inject.persist.jpa.JpaPersistService.begin(JpaPersistService.java:70)
    at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:49)
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
    at xxx.xxx.xxx.xxx.xxx.xxx$$EnhancerByGuice$$5293155f.finalize(<generated>)
    at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
    at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)
    at java.lang.ref.Finalizer.access$100(Finalizer.java:32)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:190)

Original issue reported on code.google.com by google-a...@codesmell.de on 4 Dec 2013 at 2:06

GoogleCodeExporter commented 9 years ago

Original comment by sberlin on 20 Dec 2013 at 2:15

GoogleCodeExporter commented 9 years ago
I have the same issue using Guice Persist + JTA  on Weblogic 10.3.5 :

http://stackoverflow.com/questions/23908368/problems-integrating-guice-persist-j
ta-in-weblogic-10-3-5 

Original comment by iker.ola...@gmail.com on 28 May 2014 at 2:58

GoogleCodeExporter commented 9 years ago
@sberlin Please review:
https://code.google.com/p/google-guice/source/detail?r=38120b77a32674256dd509227
8a84c52eeb20398&name=jpa_ignore_jlo_methods

Original comment by dha...@gmail.com on 12 Jun 2014 at 1:11