Repository repository = RepositoryManager.getInstance().getRepository();
RepositoryTransaction rtx = null;
try {
rtx = repository.getTransaction();
rtx.begin();
for (String name : handlerMap.keySet()) {
ConnectorHandler handler = handlerMap.get(name);
MConnector connectorMetadata = handler.getMetadata();
MConnector registeredMetadata =
repository.registerConnector(connectorMetadata, autoUpgrade);