-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @NoTransaction to the Press controller #43
Comments
Hi Matthias, sorry for late response, I was on vacation. The play guys are no longer taking updates to plugins for play version 1, so I'm no longer maintaining this plugin. Thanks for checking this out anyway. |
Hi Dirk, thanks for your reply. Matthias |
This plugin only works with play 1.x, not with play 2.x. It's no longer possible for me to update the plugin on playframework.org so essentially that means that updates to plugins for play 1.x are no longer supported. I think play 1.x as a whole is still being supported by the play team. |
Thanks for clarification! |
Hi!
If jpa/a database is configured, then for each request play! gets a connection from the connection pool and starts a transaction. You can read the detailed infos here:
http://www.playframework.com/documentation/1.2.5/jpa#transactions
So I was wondering if the controller handling the press requests (controllers.press.Press) also gets a connections and opens a transaction for each request?
If so I think it makes sense to simply add the @play.db.jpa.NoTransaction Annotation to this controller class, because press never uses any database connection and therefore would unnecessarily fetch and occupy a db connection from the pool. Which also would improve performance.
I'm I right?
Regards,
Matthias
The text was updated successfully, but these errors were encountered: