Package enterprise.web.tookit.user

Examples of enterprise.web.tookit.user.UserBeanRemote


   * @throws ValidationException
   *             - Caso o email de usuario ja exista.
   */
  private final void validarExistenciaEmailUsuario(final String email) throws ValidationException {
    try {
      final UserBeanRemote userBean = this.getServiceUserBean();

      if (userBean.emailExist(email)) {
        throw new ValidationException("E-mail de usu�rio ja existente.");
      }
    } catch (NamingException e) {
      throw new ValidationException("Erro durante a verificacao da existencia do e-mail do usuario", e);
    }
View Full Code Here


   *             Caso ocorra algum erro ao fazer lookup do EJB UserBeanRemote
   */
  private UserBeanRemote getServiceUserBean() throws NamingException {
    try {
      final InitialContext context = new InitialContext();
      final UserBeanRemote userBean = (UserBeanRemote) context.lookup("/ejb/UserBean");
      return userBean;
    } catch (NamingException e) {
      LOG.error("Erro ao Obter UserBeanRemote: ", e);
      throw e;
    }
View Full Code Here

  }

  public static void recoverPassword() {
    try {
      InitialContext context = new InitialContext();
      UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");

      userBean.recoverPassword("milena");
    } catch (Exception e) {
      e.printStackTrace();
    }

  }
View Full Code Here

  }

  public static void createUserRegis() {
    try {
      InitialContext context = new InitialContext();
      UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");

      User user = new User();

      user.setUserName("Milena Test");
      user.setUserPassword("s2s2");

      userBean.createUser(user);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

  public static void usernameExistTest() {

    try {
      InitialContext context = new InitialContext();
      UserBeanRemote userBean = (UserBeanRemote) context.lookup("ejb/UserBean");

      //System.out.println(userBean.usernameExist("regisrocha"));

      /**
       *
 
View Full Code Here

TOP

Related Classes of enterprise.web.tookit.user.UserBeanRemote

Copyright © 2018 www.massapicom. 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.