I am calling procedure from java code:
private String processData(Integer time, String jndiName) {
CallableStatement cs = null;
Connection conn = null;
try {
InitialContext ctxt = new InitialContext();
DataSource ds = (DataSource) ctxt.lookup(jndiName);
conn = ds.getConnection();
cs = conn.prepareCall("{call PROC(?)}");
cs.setInt(1, time);
cs.execute();
} catch (Exception e) {
}
This procedure just waiting for X second which I set as parameter.
The question is:
How long will take this java function when I call this procedure with parameter time=30?
It will wait untill this procedure ends or java will just run it and continue to next command ?
Yes, it will wait, it’s a blocking operation.