Examples of SecurityService


Examples of de.forsthaus.backend.service.SecurityService

    drb.setUseFullPageWidth(true); // use full width of the page
    dr = drb.build(); // build the report

    // Get information from database
    SecurityService sv = (SecurityService) SpringUtil.getBean("securityService");
    List<SecRight> resultList = sv.getAllRights();

    // Create Datasource and put it in Dynamic Jasper Format
    List data = new ArrayList(resultList.size());

    for (SecRight obj : resultList) {
View Full Code Here

Examples of it.eng.spagobi.services.security.stub.SecurityService

    protected AbstractServiceProxy() {
      init();
    }
   
    private SecurityService lookUp() throws SecurityException {
      SecurityService service;
      SecurityServiceServiceLocator locator;
     
      service = null;
      try {
        locator = new SecurityServiceServiceLocator();
View Full Code Here

Examples of net.sf.pmr.core.service.SecurityService

    LoginForm loginForm = (LoginForm) form;

    //TODO dans la page jsp remplacer le javascript pour le submit du form

    // Get the securityService
    SecurityService securityService = CoreObjectFactory.getSecurityService();
   
    // login
    User user = securityService.login(loginForm.getLogin(), loginForm.getPassword());
   

    // if user is null, access is denied

    if (user == null) {
View Full Code Here

Examples of org.andromda.timetracker.service.SecurityService

public class UserDetailsServiceImpl implements UserDetailsService {

    public UserDetails loadUserByUsername(String username)
            throws UsernameNotFoundException, DataAccessException {

      SecurityService service = ServiceLocator.instance().getSecurityService();
        UserDetailsVO userDetailsVO = service.getUserDetails(username);
        if (userDetailsVO == null) {
            throw new UsernameNotFoundException("User " + username + " not found");
        }
        return new UserDetailsImpl(userDetailsVO);
    }
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService

                        logger.debug("startup.debugEntry", entry);
                    }
                }
            }

            SecurityService securityService = assembler.getSecurityService();
            if (securityService == null) {
                String msg = messages.message("startup.assemblerReturnedNullSecurityService");
                logger.fatal(msg);
                throw new OpenEJBException(msg);
            } else {
                logger.debug("startup.securityService", securityService.getClass().getName());
            }
            system.setComponent(SecurityService.class, securityService);

            TransactionManager transactionManager = assembler.getTransactionManager();
            if (transactionManager == null) {
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService

            replyWithFatalError(out, t, "Unable to set the thread context for this request");
            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

        transactionServiceInfo.id = "Default Transaction Manager";
        transactionServiceInfo.service = "TransactionManager";
        assembler.createTransactionManager(transactionServiceInfo);

        // install security service
        SecurityService securityService = new GeronimoSecurityService();
        SecurityServiceInfo securityServiceInfo = new SecurityServiceInfo();
        PassthroughFactory.add(securityServiceInfo, securityService);
        securityServiceInfo.id = "Default Security Service";
        securityServiceInfo.service = "SecurityService";
        assembler.createSecurityService(securityServiceInfo);
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService

                        logger.debug("startup.debugEntry", entry);
                    }
                }
            }

            SecurityService securityService = assembler.getSecurityService();
            if (securityService == null) {
                String msg = messages.message("startup.assemblerReturnedNullSecurityService");
                logger.fatal(msg);
                throw new OpenEJBException(msg);
            } else {
                logger.debug("startup.securityService", securityService.getClass().getName());
            }
            system.setComponent(SecurityService.class, securityService);

            TransactionManager transactionManager = assembler.getTransactionManager();
            if (transactionManager == null) {
View Full Code Here

Examples of org.apache.openejb.spi.SecurityService

        String realmName = (String) properties.get("openejb.authentication.realmName");

        if (user != null && pass != null){
            try {
                logger.info("Logging in");
                SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class);
                if (realmName == null) {
                    clientIdentity = securityService.login(user, pass);
                } else {
                    clientIdentity = securityService.login(realmName, user, pass);
                }
                ClientSecurity.setIdentity(clientIdentity);
            } 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

        } catch (Throwable t) {
            replyWithFatalError(out, t, "Bad request");
            return;
        }

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

        final CallContext call;
        final BeanContext di;

        try {
            di = this.daemon.getDeployment(req);
        } catch (RemoteException e) {
            replyWithFatalError(out, e, "No such deployment");
            return;
            /*
                logger.warn( req + "No such deployment: "+e.getMessage());
                res.setResponse( EJB_SYS_EXCEPTION, e);
                res.writeExternal( out );
                return;
            */
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Unkown error occured while retrieving deployment");
            return;
        }

        //  Need to set this for deserialization of the body
        final ClassLoader classLoader = di.getBeanClass().getClassLoader();
        Thread.currentThread().setContextClassLoader(classLoader);

        try {
            res.start(EJBResponse.Time.DESERIALIZATION);

            req.getBody().readExternal(in);

            res.stop(EJBResponse.Time.DESERIALIZATION);
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Error caught during request processing");
            return;
        }

        try {
            call = CallContext.getCallContext();
            call.setEJBRequest(req);
            call.setBeanContext(di);
        } catch (Throwable t) {
            replyWithFatalError(out, t, "Unable to set the thread context for this request");
            return;
        }

        res.start(EJBResponse.Time.CONTAINER);
        boolean respond = true;
        try {
            switch (req.getRequestMethod()) {
                // Remote interface methods
                case EJB_OBJECT_BUSINESS_METHOD:
                    doEjbObject_BUSINESS_METHOD(req, res);
                    updateServer(req, res);
                    break;

                // Home interface methods
                case EJB_HOME_CREATE:
                    doEjbHome_CREATE(req, res);
                    updateServer(req, res);
                    break;

                // Home interface methods
                case EJB_HOME_METHOD:
                    doEjbHome_METHOD(req, res);
                    updateServer(req, res);
                    break;

                case EJB_HOME_FIND:
                    doEjbHome_FIND(req, res);
                    updateServer(req, res);
                    break;

                // javax.ejb.EJBObject methods
                case EJB_OBJECT_GET_EJB_HOME:
                    doEjbObject_GET_EJB_HOME(req, res);
                    updateServer(req, res);
                    break;

                case EJB_OBJECT_GET_HANDLE:
                    doEjbObject_GET_HANDLE(req, res);
                    updateServer(req, res);
                    break;

                case EJB_OBJECT_GET_PRIMARY_KEY:
                    doEjbObject_GET_PRIMARY_KEY(req, res);
                    updateServer(req, res);
                    break;

                case EJB_OBJECT_IS_IDENTICAL:
                    doEjbObject_IS_IDENTICAL(req, res);
                    updateServer(req, res);
                    break;

                case EJB_OBJECT_REMOVE:
                    doEjbObject_REMOVE(req, res);
                    break;

                // javax.ejb.EJBHome methods
                case EJB_HOME_GET_EJB_META_DATA:
                    doEjbHome_GET_EJB_META_DATA(req, res);
                    updateServer(req, res);
                    break;

                case EJB_HOME_GET_HOME_HANDLE:
                    doEjbHome_GET_HOME_HANDLE(req, res);
                    updateServer(req, res);
                    break;

                case EJB_HOME_REMOVE_BY_HANDLE:
                    doEjbHome_REMOVE_BY_HANDLE(req, res);
                    break;

                case EJB_HOME_REMOVE_BY_PKEY:
                    doEjbHome_REMOVE_BY_PKEY(req, res);
                    break;

                case FUTURE_CANCEL:
                    doFUTURE_CANCEL_METHOD(req, res);
                    break;
            }
            res.stop(EJBResponse.Time.CONTAINER);

        } catch (org.apache.openejb.InvalidateReferenceException e) {
            res.setResponse(ResponseCodes.EJB_SYS_EXCEPTION, new ThrowableArtifact(e.getRootCause()));
        } catch (org.apache.openejb.ApplicationException e) {
            res.setResponse(ResponseCodes.EJB_APP_EXCEPTION, new ThrowableArtifact(e.getRootCause()));
        } catch (org.apache.openejb.SystemException e) {
            res.setResponse(ResponseCodes.EJB_ERROR, new ThrowableArtifact(e.getRootCause()));
            logger.error(req + ": OpenEJB encountered an unknown system error in container: ", e);
        } catch (Throwable t) {

            replyWithFatalError(out, t, "Unknown error in container");
            respond = false;

        } finally {

            if (logger.isDebugEnabled()) {
                //The req and res toString overrides are volatile
                try {
                    logger.debug("EJB REQUEST: " + req + " -- RESPONSE: " + res);
                } catch (Throwable t) {
                    //Ignore
                }
            }

            if (respond) {
                try {
                    res.writeExternal(out);
                } catch (Throwable t) {
                    logger.error("Failed to write EjbResponse", t);
                }
            }

            try {
                securityService.disassociate();
            } catch (Throwable t) {
                logger.warning("Failed to disassociate security", t);
            }

            call.reset();
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.