Any judicial officer who refuses to act in proceedings taken at the request of the public prosecutor or to perform the service to which he is obliged before the court or tribunal and who, after an injunction made to him by the public prosecutor or the public prosecutor, persists in his refusal, shall be dismissed, without prejudice to any damages and other penalties he may have incurred.