0
rs = pstmt.executeQuery();

I want to set timer exactly before the execute query for 15 seconds for that it should be terminated.

guleryuz
  • 2,714
  • 1
  • 15
  • 19

1 Answers1

2

You can use this,

pstmt.setQueryTimeout(15);
rs = pstmt.executeQuery();
Sandeepa
  • 3,457
  • 5
  • 25
  • 41