Package org.apache.openejb.spi

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


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

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


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

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

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

        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

        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

        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(version, out, t, "Client identity is not valid - " + req);
            return;
        }
View Full Code Here

        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

        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

        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(version, out, t, "Client identity is not valid - " + req);
            return;
        }
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.