Opened 15 years ago

Closed 15 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:


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.


Change History (2)

comment:1 Changed 15 years ago by Nicklas Nordborg

Milestone: BASE 2.x+BASE 2.7
Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

The StatlessSessionImpl has public methods that we can use to cancel the query: getBatcher().cancelLastQuery(). So a workaround is to cast the StatelessSession to StatelessSessionImpl. 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.

comment:2 Changed 15 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [4243]) Fixes #920: Add support for aborting queries using a StatlessSession?

Note: See TracTickets for help on using tickets.