I tried a while to find a set of example code or tutorial that used to create a customer MapStore implementation with JTA persistence unit.
I tried to use NONE-JTA Persistence Unit (transaction-type=“RESOURCE_LOCAL”) but, Payara 6 throws very weird errors such as:
Exception during lifecycle processing
java.lang.RuntimeException: The persistence-context-ref-name [com.longz.thss.lib.jpa.jpa.store.PaymentitemMapStore/em] in module [OzsscWebApp] resolves to a persistence unit called [PG15_OZSSC_NONJTAPU] which is of type RESOURCE_LOCAL. Only persistence units with transaction type JTA can be used as a container managed entity manager. Please verify your application.
The problem is, I don’t use Container managed Entity Manager at all. I just used Application managed transaction in my MapStore implementation.
Anyone have such experience, please advise!