...
The above @PersistenceContext annotation usage is 100% equivalent to the following xml.
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
<persistence-context-ref> <persistence-context-ref-name>myFooEntityManager</persistence-context-ref-name> <persistence-unit-name>foo-unit</persistence-unit-name> <persistence-context-type>Transaction</persistence-context-type> </persistence-context-ref> <persistence-context-ref> <persistence-context-ref-name>org.superbiz.calculator.MyBean/myBarEntityManager</persistence-context-ref-name> <persistence-unit-name>bar-unit</persistence-unit-name> <persistence-context-type>Transaction</persistence-context-type> <injection-target> <injection-target-class>org.superbiz.calculator.MyBean</injection-target-class> <injection-target-name>myBarEntityManager</injection-target-name> </injection-target> </persistence-context-ref> |