@Override
    public void gridletSubmit(Gridlet gridlet, boolean ack) {
    	if(!gridlet.hasReserved()) {
    		super.gridletSubmit(gridlet, ack);
    	} 
    	else {
    		if(!handleReservationJob(gridlet)) {
	    		try {
					gridlet.setGridletStatus(Gridlet.FAILED);
				} catch (Exception e) {
					// should not happen
					logger.log(Level.WARNING, "Error submitting gridlet", e);
				}
	    		super.sendFinishGridlet(gridlet);
    		} 
    		else {
	            if (ack) {
	                // sends back an ack
	            	super.sendAck(GridSimTags.GRIDLET_SUBMIT_ACK, true,
	            			gridlet.getGridletID(), gridlet.getUserID());
	            }
    		}
    	}
    }