// Schema version of the persistence.xml file
unitInfo.setPersistenceXMLSchemaVersion(info.persistenceXMLSchemaVersion);
// Second-level cache mode for the persistence unit
SharedCacheMode sharedCacheMode = Enum.valueOf(SharedCacheMode.class, info.sharedCacheMode);
unitInfo.setSharedCacheMode(sharedCacheMode);
// The validation mode to be used for the persistence unit
ValidationMode validationMode = Enum.valueOf(ValidationMode.class, info.validationMode);
unitInfo.setValidationMode(validationMode);