Package org.apache.xbean.recipe

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


                loginContext = ContextManager.login(realmName, callbackHandler);
                clientSubject = loginContext.getSubject();
            }
            ContextManager.setCallers(clientSubject, clientSubject);
            ObjectRecipe objectRecipe = new ObjectRecipe(mainClassName);
            objectRecipe.allow(Option.FIELD_INJECTION);
            objectRecipe.allow(Option.PRIVATE_PROPERTIES);
            objectRecipe.allow(Option.STATIC_PROPERTIES);
            Class mainClass = classLoader.loadClass(mainClassName);
            List<Injection> injections = new ArrayList<Injection>();
            while (mainClass != null && mainClass != Object.class) {
View Full Code Here


                clientSubject = loginContext.getSubject();
            }
            ContextManager.setCallers(clientSubject, clientSubject);
            ObjectRecipe objectRecipe = new ObjectRecipe(mainClassName);
            objectRecipe.allow(Option.FIELD_INJECTION);
            objectRecipe.allow(Option.PRIVATE_PROPERTIES);
            objectRecipe.allow(Option.STATIC_PROPERTIES);
            Class mainClass = classLoader.loadClass(mainClassName);
            List<Injection> injections = new ArrayList<Injection>();
            while (mainClass != null && mainClass != Object.class) {
                List<Injection> perClass = holder.getInjections(mainClass.getName());
View Full Code Here

            }
            ContextManager.setCallers(clientSubject, clientSubject);
            ObjectRecipe objectRecipe = new ObjectRecipe(mainClassName);
            objectRecipe.allow(Option.FIELD_INJECTION);
            objectRecipe.allow(Option.PRIVATE_PROPERTIES);
            objectRecipe.allow(Option.STATIC_PROPERTIES);
            Class mainClass = classLoader.loadClass(mainClassName);
            List<Injection> injections = new ArrayList<Injection>();
            while (mainClass != null && mainClass != Object.class) {
                List<Injection> perClass = holder.getInjections(mainClass.getName());
                if (perClass != null) {
View Full Code Here

    private void construct() throws OpenEJBException {
        if (instance != null) throw new IllegalStateException("Instance already constructed");

        ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
        objectRecipe.allow(Option.FIELD_INJECTION);
        objectRecipe.allow(Option.PRIVATE_PROPERTIES);
        objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        objectRecipe.allow(Option.NAMED_PARAMETERS);

        fillInjectionProperties(objectRecipe);
View Full Code Here

    private void construct() throws OpenEJBException {
        if (instance != null) throw new IllegalStateException("Instance already constructed");

        ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
        objectRecipe.allow(Option.FIELD_INJECTION);
        objectRecipe.allow(Option.PRIVATE_PROPERTIES);
        objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        objectRecipe.allow(Option.NAMED_PARAMETERS);

        fillInjectionProperties(objectRecipe);
View Full Code Here

        if (instance != null) throw new IllegalStateException("Instance already constructed");

        ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
        objectRecipe.allow(Option.FIELD_INJECTION);
        objectRecipe.allow(Option.PRIVATE_PROPERTIES);
        objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        objectRecipe.allow(Option.NAMED_PARAMETERS);

        fillInjectionProperties(objectRecipe);

        for (Entry<String, Object> entry : properties.entrySet()) {
View Full Code Here

        ObjectRecipe objectRecipe = new ObjectRecipe(beanClass);
        objectRecipe.allow(Option.FIELD_INJECTION);
        objectRecipe.allow(Option.PRIVATE_PROPERTIES);
        objectRecipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        objectRecipe.allow(Option.NAMED_PARAMETERS);

        fillInjectionProperties(objectRecipe);

        for (Entry<String, Object> entry : properties.entrySet()) {
            objectRecipe.setProperty(entry.getKey(), entry.getValue());
View Full Code Here

                            recipe = new ObjectRecipe(serviceClass, "createServerService");
                        }
                    } catch (Throwable e) {
                    }

                    recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
                    recipe.allow(Option.IGNORE_MISSING_PROPERTIES);

                    service = (ServerService) recipe.create(serviceClass.getClassLoader());

                    if (service instanceof DiscoveryAgent){
View Full Code Here

                        }
                    } catch (Throwable e) {
                    }

                    recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
                    recipe.allow(Option.IGNORE_MISSING_PROPERTIES);

                    service = (ServerService) recipe.create(serviceClass.getClassLoader());

                    if (service instanceof DiscoveryAgent){
                        DiscoveryAgent agent = (DiscoveryAgent) service;
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

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.