statementListener.executionStarted(this); this.completed = false;
notifyStatementStarted();
    public int[] executeBatch() throws  SQLException {        if (closed)            throw new FBSQLException("Statement is closed");                if (statementListener.getConnection().getAutoCommit())            addWarning(new SQLWarning("Batch updates should be run " +                    "with auto-commit disabled.", "1000"));                statementListener.executionStarted(this);        this.completed = false;                try {            Object syncObject = getSynchronizationObject();            LinkedList responses = new LinkedList();                        boolean commit = false;            synchronized(syncObject) {                try {                                        Iterator iter = batchList.iterator();                    while(iter.hasNext()) {                    	String sql = (String)iter.next();                        try {                        	boolean hasResultSet = internalExecute(sql);                                                        if (hasResultSet)                            	throw new BatchUpdateException(toArray(responses));                            else                                responses.add(new Integer(getUpdateCount()));                        } catch (GDSException ge) {                                                        throw new BatchUpdateException(                                    ge.getMessage(),                                     FBSQLException.SQL_STATE_GENERAL_ERROR,                                    ge.getFbErrorCode(),                                    toArray(responses));                        }                    }                                       commit = true;                                        return toArray(responses);                                    } finally {                    clearBatch();                }            }        } finally {            this.completed = true;            statementListener.statementCompleted(this);        }    }