Politicians and trade unions have hit out at the decision to close the refinery.