Package org.datanucleus.plugin

Examples of org.datanucleus.plugin.ConfigurationElement


            // Create if not already present
            String implCreatorName = persistenceConfig.getStringProperty("datanucleus.implementationCreatorName");
            try
            {
                Class cls = null;
                ConfigurationElement elem =
                    getPluginManager().getConfigurationElementForExtension("org.datanucleus.implementation_creator",
                        "name", implCreatorName);
                if (elem != null)
                {
                    try
                    {
                        cls = Class.forName(elem.getAttribute("class-name"), true,
                            ObjectManagerFactoryImpl.class.getClassLoader());
                        ic = (ImplementationCreator)cls.newInstance();
                    }
                    catch (Exception e)
                    {
View Full Code Here


                this.mconn = null;
            }
        };

        Class cls = null;
        ConfigurationElement elem =
            om.getOMFContext().getPluginManager().getConfigurationElementForExtension(
                "org.datanucleus.store_valuegenerator",
                new String[]{"name", "datastore"},
                new String[] {valueGeneratorName, storeManager.getStoreManagerKey()});
        if (elem != null)
        {
            cls = om.getOMFContext().getPluginManager().loadClass(
                elem.getExtension().getPlugin().getSymbolicName(), elem.getAttribute("class-name"));
        }
        if (cls == null)
        {
            throw new NucleusException("Cannot create ValueGenerator for strategy "+valueGeneratorName);
        }
View Full Code Here

      strategyName = cmd.getIdentityMetaData().getValueStrategy().getCustomName();
    }

    // Check the POID type being stored
    Class poidClass = Long.class;
    ConfigurationElement elem =
        storeMgr.getOMFContext().getPluginManager().getConfigurationElementForExtension(
            "org.datanucleus.store_valuegenerator",
            new String[]{"name", "unique"}, new String[]{strategyName, "true"});
    if (elem == null) {
      // Not datastore-independent, so try for this datastore
      elem = storeMgr.getOMFContext().getPluginManager().getConfigurationElementForExtension(
          "org.datanucleus.store_valuegenerator",
          new String[]{"name", "datastore"},
          new String[]{strategyName, storeMgr.getStoreManagerKey()});
    }
    if (elem != null) {
      // Set the generator name (for use by the PoidManager)
      String generatorClassName = elem.getAttribute("class-name");
      Class generatorClass =
          getStoreManager().getOMFContext().getClassLoaderResolver(null)
              .classForName(generatorClassName);
      try {
        poidClass = (Class) generatorClass.getMethod("getStorageClass").invoke(null);
View Full Code Here

TOP

Related Classes of org.datanucleus.plugin.ConfigurationElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.