@Override
  protected ModelType finalizeElement() {
    super.finalizeElement();

    element.setVendor(XMLConstants.VENDOR_NAME);
    element.setCarnotVersion(CurrentVersion.getVersionName());

    element.setScript(XpdlFactory.eINSTANCE.createScriptType());
    element.getScript().setType("text/ecmascript");
    element.setTypeDeclarations(XpdlFactory.eINSTANCE.createTypeDeclarationsType());

    element.setCreated(new Date().toString());

    element.setAuthor(System.getProperty("user.name"));

    element.setModelOID(0);

    // add default elements
    List<ModelInitializer> modelInitializers = CollectionUtils.newArrayList();
    modelInitializers.add(new DefaultTypesInitializer());
    modelInitializers.add(new DefaultElementsInitializer());
    // allow for third party extensions
    modelInitializers.addAll(ExtensionProviderUtils.getExtensionProviders(ModelInitializer.class));

    for (ModelInitializer initializer : modelInitializers) {
      initializer.initializeModel(element);
    }

    if (null != definition) {
      definition.build(element);
    }

    return element;
  }
 static {
   CONNECTION_FACTORY_PROVIDER =
       ExtensionProviderUtils.getFirstExtensionProvider(
           HazelcastJcaConnectionFactoryProvider.class,
           KernelTweakingProperties.HZ_JCA_CONNECTION_FACTORY_PROVIDER);
   if (CONNECTION_FACTORY_PROVIDER == null) {
     throw new IllegalStateException(
         "No Hazelcast JCA connection factory provider could be found.");
   }
 }