jpa - Jetty+Jersey: are container-managed entity transactions possible? -




i'm using hibernate/jpa 5.2.10 jetty 9.4.

is possible set jetty in way such that:

a) servlet requests (including jersey) wrapped in entity transactions, and

b) required entitymanager accessible within jersey resource classes

?

i don't want use spring/di/ioc , stuff , keep things simple , fast possible. there other ways achieve jersey restful development rapid "rtt"?

maybe implement static method create entity manager , associate current request, , set request listener cleanup, , use method explicitly inside jersey resource methods? em factory , store inside webapp context, , use listener cleanup. though, i'd prefer trodden path, existing java ee seem bent on killing unit testing extent.





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

Asterisk AGI Python Script to Dialplan does not work -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -