Examples of associate()


Examples of org.apache.openejb.spi.SecurityService.associate()

            return;
        }

        try {
            SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
            securityService.associate(req.getClientIdentity());
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Security system failed to associate thread with the thread");
            return;
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
        try {
            final Object clientIdentity = req.getClientIdentity();
            if (clientIdentity != null) {//noinspection unchecked
                securityService.associate(clientIdentity);
            }
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Client identity is not valid: " + req);
            return;
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        ThreadContext callContext = ThreadContext.getThreadContext();
        Object localClientIdentity = ClientSecurity.getIdentity();
        try {
            if (callContext == null && localClientIdentity != null) {
                SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
                securityService.associate(localClientIdentity);
            }
            if (strategy == CLASSLOADER_COPY) {

                IntraVmCopyMonitor.pre(strategy);
                ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        ThreadContext callContext = ThreadContext.getThreadContext();
        Object localClientIdentity = ClientSecurity.getIdentity();
        try {
            if (callContext == null && localClientIdentity != null) {
                SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
                securityService.associate(localClientIdentity);
            }
            if (strategy == CLASSLOADER_COPY) {

                IntraVmCopyMonitor.pre(strategy);
                ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                if (realmName == null) {
                    identity = securityService.login(user, pass);
                } else {
                    identity = securityService.login(realmName, user, pass);
                }
                securityService.associate(identity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        try {
            try {
                final Object clientIdentity = req.getClientIdentity();
                if (clientIdentity != null) {//noinspection unchecked
                    securityService.associate(clientIdentity);
                }
            } catch (LoginException t) {
                failed = true;
                return setResponseError(res, version, t, "Client identity is not valid - " + req);
            }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                if (realmName == null) {
                    identity = securityService.login(user, pass);
                } else {
                    identity = securityService.login(realmName, user, pass);
                }
                securityService.associate(identity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        if (user != null && pass != null){
            try {
                SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
                Object identity = securityService.login(user, pass);
                securityService.associate(identity);
            } catch (LoginException e) {
                throw (AuthenticationException) new AuthenticationException("User could not be authenticated: "+user).initCause(e);
            }
        }
        ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

        Object token;
        try {
            securityService.disassociate();

            token = securityService.login(user, password);
            securityService.associate(token);

        } catch (LoginException e) {
            throw new SecurityException("cannot log user " + user, e);
        }
    }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService.associate()

                    try {
                        final SecurityService securityService = getSecurityService();
                        token = securityService.login(realmName, username, password);
                        if (token != null) {
                            securityService.associate(token);
                        }
                    } catch (LoginException e) {
                        // login failed, return 401
                    }
                }
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.