Obviously, you can only do it if statements are being tracked.
Otherwise, the statement is not recorded or wrapped.
The other part is whether this should be optional, i.e. you need to add a
<cancel-statements/>
since not all drivers need this check?
The most optimal way of doing it (and also the most generic)
would be store an "inExecute" reference count inside the WrappedStatement
for the number of times the execute method is being invoked concurrently.
This way we know whether the statement should be canceled.
I think cancelling statements is a good idea in general anyway.
e.g. If we are returning prepared statements to the pool we want to make
absolutely certain it is not currently invoking on the db.
But the latter part is probably just a debug feature for strange multi-threaded
uses? e.g. servlets.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025520#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...