24 lines
649 B
Plaintext
24 lines
649 B
Plaintext
The use of a "RESOURCE_LOCAL" ``++persistence-unit++`` makes you responsible for your own entity management, which involves a lot of extra boilerplate code to get right. Instead, set this to "JPA" in a JavaSE environment or omit it altogether in a JavaEE environment, where "JPA" is the default.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
<persistence-unit transaction-type="RESOURCE_LOCAL"> <!-- Noncompliant -->
|
|
----
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
<persistence-unit transaction-type="JTA">
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|