Package org.apache.xbean.recipe

Examples of org.apache.xbean.recipe.ObjectRecipe.allow()


        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
            String name = entry.getKey().getLocalPart();
            properties.put(name, entry.getValue());
        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        Host host = (Host) recipe.create(cl);

        for (ListenerType listenerType : getListener()) {
            LifecycleListener listener = listenerType.getLifecycleListener(cl);
            host.addLifecycleListener(listener);
View Full Code Here


        }
        if (isUseIPVHosts() != null) {
            properties.put(USE_IPVHOSTS, isUseIPVHosts());
        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        recipe.setConstructorArgTypes(new Class[] { String.class });
        recipe.setConstructorArgNames(new String[] { "protocol" });
        Connector connector = (Connector) recipe.create(cl);
        boolean executorSupported = !connector.getProtocolHandlerClassName().equals("org.apache.jk.server.JkCoyoteHandler");
        for (Map.Entry<QName, String> entry : otherAttributes.entrySet()) {
View Full Code Here

        ObjectRecipe recipe = new ObjectRecipe(descriptor.getImplementationClass(),
                factoryMethod,
                constructorArgNames,
                constructorArgTypes);
        recipe.allow(Option.FIELD_INJECTION);
        recipe.allow(Option.PRIVATE_PROPERTIES);

        // MapOrientedComponents don't get normal injection
        if (!MapOrientedComponent.class.isAssignableFrom(descriptor.getImplementationClass())) {
            for (ComponentRequirement requirement : descriptor.getRequirements() ) {
View Full Code Here

        ObjectRecipe recipe = new ObjectRecipe(descriptor.getImplementationClass(),
                factoryMethod,
                constructorArgNames,
                constructorArgTypes);
        recipe.allow(Option.FIELD_INJECTION);
        recipe.allow(Option.PRIVATE_PROPERTIES);

        // MapOrientedComponents don't get normal injection
        if (!MapOrientedComponent.class.isAssignableFrom(descriptor.getImplementationClass())) {
            for (ComponentRequirement requirement : descriptor.getRequirements() ) {
                String name = requirement.getFieldName();
View Full Code Here

        ObjectRecipe recipe = new ObjectRecipe(descriptor.getImplementationClass(),
                factoryMethod,
                constructorArgNames,
                constructorArgTypes);
        recipe.allow(Option.FIELD_INJECTION);
        recipe.allow(Option.PRIVATE_PROPERTIES);

        // MapOrientedComponents don't get normal injection
        if (!MapOrientedComponent.class.isAssignableFrom(descriptor.getImplementationClass())) {
            for (ComponentRequirement requirement : descriptor.getRequirements() ) {
View Full Code Here

        ObjectRecipe recipe = new ObjectRecipe(descriptor.getImplementationClass(),
                factoryMethod,
                constructorArgNames,
                constructorArgTypes);
        recipe.allow(Option.FIELD_INJECTION);
        recipe.allow(Option.PRIVATE_PROPERTIES);

        // MapOrientedComponents don't get normal injection
        if (!MapOrientedComponent.class.isAssignableFrom(descriptor.getImplementationClass())) {
            for (ComponentRequirement requirement : descriptor.getRequirements() ) {
                String name = requirement.getFieldName();
View Full Code Here

        } else if (service instanceof ManagedConnectionFactory) {
            ManagedConnectionFactory managedConnectionFactory = (ManagedConnectionFactory) service;

            // connection manager is constructed via a recipe so we automatically expose all cmf properties
            ObjectRecipe connectionManagerRecipe = new ObjectRecipe(GeronimoConnectionManagerFactory.class, "create");
            connectionManagerRecipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
            connectionManagerRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
            connectionManagerRecipe.setAllProperties(serviceInfo.properties);
            connectionManagerRecipe.setProperty("name", serviceInfo.id);

            // standard properties
View Full Code Here

            ManagedConnectionFactory managedConnectionFactory = (ManagedConnectionFactory) service;

            // connection manager is constructed via a recipe so we automatically expose all cmf properties
            ObjectRecipe connectionManagerRecipe = new ObjectRecipe(GeronimoConnectionManagerFactory.class, "create");
            connectionManagerRecipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
            connectionManagerRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
            connectionManagerRecipe.setAllProperties(serviceInfo.properties);
            connectionManagerRecipe.setProperty("name", serviceInfo.id);

            // standard properties
            connectionManagerRecipe.setProperty("transactionManager", transactionManager);
View Full Code Here

    private ObjectRecipe createRecipe(ServiceInfo info) {
        Logger serviceLogger = logger.getChildLogger("service");
        serviceLogger.info("createService", info.service, info.id, info.className);
        String[] constructorArgs = info.constructorArgs.toArray(new String[info.constructorArgs.size()]);
        ObjectRecipe serviceRecipe = new ObjectRecipe(info.className, info.factoryMethod, constructorArgs, null);
        serviceRecipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
        serviceRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        serviceRecipe.setAllProperties(info.properties);

        if (serviceLogger.isDebugEnabled()){
            for (Map.Entry<String, Object> entry : serviceRecipe.getProperties().entrySet()) {
View Full Code Here

        Logger serviceLogger = logger.getChildLogger("service");
        serviceLogger.info("createService", info.service, info.id, info.className);
        String[] constructorArgs = info.constructorArgs.toArray(new String[info.constructorArgs.size()]);
        ObjectRecipe serviceRecipe = new ObjectRecipe(info.className, info.factoryMethod, constructorArgs, null);
        serviceRecipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
        serviceRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        serviceRecipe.setAllProperties(info.properties);

        if (serviceLogger.isDebugEnabled()){
            for (Map.Entry<String, Object> entry : serviceRecipe.getProperties().entrySet()) {
                serviceLogger.debug("createService.props", entry.getKey(), entry.getValue());
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.