java.sql.Statement.setQueryTimeout(int) should do the trick.

On 4/19/22 3:30 AM, Marco Ferretti wrote:
Hi all,
I am trying to simulate a query timeout in a stored procedure by simply adding 
a delay in my (test) jar.
I then am launching the stored procedure in my java code via JPA and try to set 
a timeout hint by adding
.setHint("javax.persistence.query.timeout", milliseconds)
but I am not able to register a timeout.
I am wondering if there is some derby property or jdbc property I should use to 
activate such behavior. I have tried to google for it but I am having extremely 
bad results... but according to this 
(https://docs.oracle.com/cd/E25178_01/apirefs.1111/e13952/pagehelp/J2EEkodojdbcconfdescriptorDerbyDictionaryBeantitle.html)
 I have to activate it somehow.

Does Derby supports query timeout at all? If so, can you please point me to 
some references ?
Thanks in advance for any help,
Marco


Reply via email to