Examples of allow()


Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[3] Test getRollbackOnly ////////////*/
        try {
            ejbContext.getRollbackOnly();
            policy.allow(OperationsPolicy.Context_getRollbackOnly);
        } catch (IllegalStateException ise) {
        }

        /*[4] Test setRollbackOnly ////////////*/
        try {
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[4] Test setRollbackOnly ////////////*/
        try {
            ejbContext.setRollbackOnly();
            policy.allow(OperationsPolicy.Context_setRollbackOnly);
        } catch (IllegalStateException ise) {
        }

        /*[5] Test getUserTransaction /////////*/
        try {
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[5] Test getUserTransaction /////////*/
        try {
            ejbContext.getUserTransaction();
            policy.allow(OperationsPolicy.Context_getUserTransaction);
        } catch (IllegalStateException ise) {
        }

        /*[6] Test getEJBObject ///////////////*/
        try {
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[6] Test getEJBObject ///////////////*/
        try {
            ejbContext.getEJBObject();
            policy.allow(OperationsPolicy.Context_getEJBObject);
        } catch (IllegalStateException ise) {
        }

        /*[7] Test Context_getPrimaryKey ///////////////
                  *
 
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        try {
            InitialContext jndiContext = new InitialContext();

            String actual = (String) jndiContext.lookup("java:comp/env/stateless/references/JNDI_access_to_java_comp_env");

            policy.allow(OperationsPolicy.JNDI_access_to_java_comp_env);
        } catch (IllegalStateException ise) {
        } catch (NamingException ne) {
        }

        /*[11] Test lookup /////////*/
 
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[11] Test lookup /////////*/
        try {
            ejbContext.lookup("stateless/references/JNDI_access_to_java_comp_env");
            policy.allow(OperationsPolicy.Context_lookup);
        } catch (IllegalArgumentException ise) {
        }

        /*[12] Test getTimerService/////////*/
        try {
View Full Code Here

Examples of org.apache.openejb.test.object.OperationsPolicy.allow()

        }

        /*[12] Test getTimerService/////////*/
        try {
            ejbContext.getTimerService();
            policy.allow(OperationsPolicy.Context_getTimerService);
        } catch (IllegalStateException ise) {
        }

        allowedOperationsTable.put(methodName, policy);
    }
View Full Code Here

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

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

                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

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

            }
            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
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.