Skip to content

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

@gissuebot

Description

@gissuebot

From michael.newton 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions