google / google/guice

guice-persist: @Transactional does not work with multiple Persistence Units

Open
#705 3 comments 0 reactions 0 assignees View on GitHub
Component-Persist imported
Dominant language
Java
Stars
12.7k
Forks
1.7k
Avg merge
11m
Merged PRs (30d)
2

Description

_From [michael.newton](https://code.google.com/u/109879266526929443023/) on May 16, 2012 20:31:58_

When using multiple persistence units where you cannot make the `@`Transactional annotation work without a n elaborate workaround involving copying verbatim core source (JpaLocalTxnInterceptor) from guice-persist into your project and then doing some very special bindings in your module.

The thread at https://groups.google.com/forum/?fromgroups#!searchin/google-guice/@Transactional$20guice-persist$20not/google-guice/kbXr4k0N2QE/W_6VAvo5Mn0J discusses the problem and workaround.

Reproduce by following the procedure described in https://code.google.com/p/google-guice/wiki/GuicePersistMultiModules , then applying the `@`Transaction annotation to a method that persists entities as described in https://code.google.com/p/google-guice/wiki/Transactions The intereceptor will not be called and the entity will not be saved.

_Original issue: http://code.google.com/p/google-guice/issues/detail?id=705_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.