Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added setPageAhead(false) to documentation and sample application #880

Merged
merged 2 commits into from Mar 20, 2013

Conversation

Projects
None yet
2 participants
Contributor

agterdenbos commented Mar 20, 2013

Added setPageAhead(false) to avoid SQLexception in Ebean PagingList queries. Fixes #877

  • setPageAhead(false) added to the model class example in Ebean ORM documentation
  • setPageAhead(false) added to Computer model class of the computer-database sample application

agterdenbos added some commits Mar 19, 2013

@agterdenbos agterdenbos Fix to avoid asynchronous Ebean fetchAhead (automatically fetches the…
… next page)

When a page is accessed, Ebean LimitOffsetPagingQuery.java automatically
starts a new background thread to fetch the next page. This thread uses
a database connection that can be still alive after the HTTP request was
processed. On heavy load, this problem causes the following exception:
java.sql.SQLException: Timed out waiting for a free available
connection.

FetchAhead is useless in a stateless web application. Therefore, it must
be disabled using setFetchAhead(false).
e260969
@agterdenbos agterdenbos Disable FetchAhead in Ebean documentation
To prevent SQLexception
fixes #877
54d7ef7

@jroper jroper added a commit that referenced this pull request Mar 20, 2013

@jroper jroper Merge pull request #880 from agterdenbos/master
added setPageAhead(false) to documentation and sample application
bff098f

@jroper jroper merged commit bff098f into playframework:master Mar 20, 2013

Contributor

agterdenbos commented Mar 21, 2013

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment