Examples of CdoUnit


Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

            if (propertiesType != null) {
                for (PropertyType propertyType : propertiesType.getProperty()) {
                    properties.setProperty(propertyType.getName(), propertyType.getValue());
                }
            }
            CdoUnit cdoUnit = new CdoUnit(name, description, uri, provider, types, instanceListeners, validationMode, concurrencyMode, defaultTransactionAttribute, properties);
            cdoUnits.add(cdoUnit);
        }
        return cdoUnits;
    }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

        this.cdoUnits = readCdoDescriptors();
    }

    @Override
    public CdoManagerFactory createCdoManagerFactory(String name) {
        CdoUnit cdoUnit = cdoUnits.get(name);
        if (cdoUnit == null) {
            throw new CdoException("CDO unit with name '" + name + "' does not exist.");
        }
        return createCdoManagerFactory(cdoUnit);
    }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

        try {
            Enumeration<URL> resources = classLoader.getResources("META-INF/cdo.xml");
            while (resources.hasMoreElements()) {
                URL url = resources.nextElement();
                for (CdoUnit cdoUnit : cdoUnitFactory.getCdoUnits(url)) {
                    CdoUnit existingCdoUnit = result.put(cdoUnit.getName(), cdoUnit);
                    if (existingCdoUnit != null) {
                        throw new CdoException("Found more than one CDO unit with name '" + cdoUnit.getName() + "'.");
                    }
                }
            }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

        return this.componentName;
    }

    @Override
    public void updated(String pid, Dictionary<String, ?> properties) throws ConfigurationException {
        CdoUnit cdoUnit;
        try {
            cdoUnit = getCdoUnit(properties);
        } catch (CdoException e) {
            throw new ConfigurationException(CdoUnitParameter.NAME.getKey(), e.getMessage(), e);
        }
        if (registeredCdoUnits.contains(cdoUnit.getName())) {
            LOGGER.debug("Update not yet supported {}", pid);
            return;
        }
        CdoManagerFactory cdoManagerFactory = new CdoManagerFactoryImpl<>(cdoUnit);

        Dictionary<String, Object> p = new Hashtable<>();
        p.put("name", cdoUnit.getName());
        ServiceRegistration<CdoManagerFactory> serviceRegistration = componentContext.getBundleContext().registerService(CdoManagerFactory.class,
                cdoManagerFactory, p);

        registeredCdoUnits.add(cdoUnit.getName());
        pidsToFactories.put(pid, cdoManagerFactory);
        pidsToServiceRegistrations.put(pid, serviceRegistration);
    }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

            if (propertiesType != null) {
                for (PropertyType propertyType : propertiesType.getProperty()) {
                    properties.setProperty(propertyType.getName(), propertyType.getValue());
                }
            }
            CdoUnit cdoUnit = new CdoUnit(name, description, url, provider, types, validationMode, defaultTransactionAttribute, properties);
            cdoUnits.put(name, cdoUnit);
        }
    }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

            cdoUnits.put(name, cdoUnit);
        }
    }

    public CdoUnit getCdoUnit(String name) {
        CdoUnit cdoUnit = cdoUnits.get(name);
        if (cdoUnit == null) {
            throw new CdoException("CDO unit with name '" + name + "' does not exist.");
        }
        return cdoUnit;
    }
View Full Code Here

Examples of com.buschmais.cdo.api.bootstrap.CdoUnit

        cdoUnitFactory = new CdoUnitFactory();
    }

    @Override
    public CdoManagerFactory createCdoManagerFactory(String name) {
        CdoUnit cdoUnit = cdoUnitFactory.getCdoUnit(name);
        return createCdoManagerFactory(cdoUnit);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.