Opened 14 years ago

Closed 14 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 Changed 14 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 14 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.