Opened 17 years ago
Closed 17 years ago
#920 closed enhancement (fixed)
Add support for aborting queries using a StatlessSession
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.7 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
Many of our performance-sensitive queries use a StatelessSession since that has lower overhead. A drawback is that we can't add support for aborting this kind of queries since there is no StatelessSession.cancelQuery() method. I have posted a question about this in the Hibernate forums. Hopefully, they will implement it in the future and we can fix this ticket.
See http://forum.hibernate.org/viewtopic.php?t=983499&start=0&postdays=0&postorder=asc&highlight=
Change History (2)
comment:1 by , 17 years ago
Milestone: | BASE 2.x+ → BASE 2.7 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [4243]) Fixes #920: Add support for aborting queries using a StatlessSession
Note:
See TracTickets
for help on using tickets.
The
StatlessSessionImpl
has public methods that we can use to cancel the query:getBatcher().cancelLastQuery()
. So a workaround is to cast theStatelessSession
toStatelessSessionImpl
. The risk we are running is that the implementation may change in the future since it is strictly speaking not part of the public Hibernate API.