Comment #3 on issue 731 by [email protected]: Add @UnitOfWork annotation
http://code.google.com/p/google-guice/issues/detail?id=731

Hi @julian,

Thanks for trying out the patch. Sorry to hear you had problems with it.

Having had a look at the patch with fresh eyes, you hit the nail on the head. Nested transactions call "unitOfWork.begin()", but not "unitOfWork.end()", which would cause the problem you saw.

I'll post an updated patch when I get a chance. I've searched for any other possible mismatched begin/end calls, but that's the only one.

It should be an easy fix if you want to do it yourself. In JpaLocalTxnInterceptor, just add a try/finally block around line 56, so it becomes:

try {
  return methodInvocation.proceed();
} finally {
  unitOfWork.end();
}

Hope that helps some :)

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to