move the code to create new instance of CertProfile and CertPublisher
from ca-mgmt-api to ca-server
handle exception during shutdown of datasource