Examples of SessionData


Examples of org.apache.openmeetings.db.entity.server.Sessiondata

        log.error("Could not find session to update: " + SID);
        return false;
      } else {
        // log.error("Found session to update: "+SID);
      }
      Sessiondata sd = fullList.get(0);
      sd.setRefresh_time(new Date());
      sd.setSessionXml(sessionXml);

      if (sd.getId() == null) {
        em.persist(sd);
      } else {
        if (!em.contains(sd)) {
          em.merge(sd);
        }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.server.Sessiondata

      if (fullList.size() == 0) {
        log.error("Found NO session to updateSession: ");

      } else {
        // log.debug("Found session to updateSession: ");
        Sessiondata sd = fullList.iterator().next();
        // log.debug("Found session to updateSession sd "+sd.getUser_id()+" "+sd.getSession_id());
        sd.setRefresh_time(new Date());

        if (sd.getId() == null) {
          em.persist(sd);
        } else {
          if (!em.contains(sd)) {
            em.merge(sd);
          }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.server.Sessiondata

      Calendar rightNow = Calendar.getInstance();
      rightNow.setTimeInMillis(rightNow.getTimeInMillis() - 1800000);
      List<Sessiondata> l = this.getSessionToDelete(rightNow.getTime());
      log.debug("clearSessionTable: " + l.size());
      for (Iterator<Sessiondata> it = l.iterator(); it.hasNext();) {
        Sessiondata sData = it.next();
        sData = em.find(Sessiondata.class, sData.getId());
        em.remove(sData);
      }
    } catch (Exception err) {
      log.error("clearSessionTable", err);
    }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.server.Sessiondata

        int end_pos = init_pos + 32;
        if (end_pos > aux.length())
          end_pos = aux.length();
        String SID = aux.substring(init_pos, end_pos);

        Sessiondata sData = this.getSessionByHash(SID);

        sData = em.find(Sessiondata.class, sData.getId());
        em.remove(sData);
      }

    } catch (Exception err) {
      log.error("clearSessionByRoomId", err);
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.Sessiondata

  @Autowired
  private UserManager userManager;

  @Test
  public void testTestLogin(){
    Sessiondata sessionData = mService.getsessiondata();
   
    User us = (User) userManager.loginUser(sessionData.getSession_id(), username, userpass, null, null, false);
   
    assertNotNull("User is unable to login", us);
   
    //mService.getLanguageById(1);
   
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.Sessiondata

  @Autowired
  private MainService mService;

  @Test
  public void testTestAuth() {
    Sessiondata sessionData = mService.getsessiondata();

    System.out.println("sessionData: " + sessionData.getSession_id());

    String tTemp = manageCryptStyle.getInstanceOfCrypt().createPassPhrase(
        "test");

    System.out.println("tTemp: " + tTemp);
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.Sessiondata

  public boolean isSignedIn() {
    return (userId > -1);
  }

  public boolean signIn(String login, String password) {
    Sessiondata sessData = Application.getBean(SessiondataDao.class).startsession();
    SID = sessData.getSession_id();
    Object u = Application.getBean(UserManager.class).loginUser(SID, login, password,
        null, null, false);
   
    if (u instanceof User) {
      User user = (User)u;
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.Sessiondata

    try {

      log.debug("startsession :: startsession");

      long thistime = new Date().getTime();
      Sessiondata sessiondata = new Sessiondata();
      sessiondata.setSession_id(manageCryptStyle.getInstanceOfCrypt()
          .createPassPhrase(String.valueOf(thistime).toString()));
      sessiondata.setRefresh_time(new Date());
      sessiondata.setStarttermin_time(new Date());
      sessiondata.setUser_id(null);

      sessiondata = em.merge(sessiondata);

      return sessiondata;
    } catch (Exception ex2) {
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.basic.Sessiondata

      if (fullList.size() == 0) {
        log.error("Could not find session to update: " + SID);
        return null;
      }

      Sessiondata sd = fullList.get(0);

      return sd;
    } catch (Exception ex2) {
      log.error("[updateUser]: ", ex2);
    }
View Full Code Here

Examples of org.apache.tomee.webapp.application.SessionData

    private static final String CONTEXT_KEY = "UserSessionListener_USER_CONTEXT";
    private static final String OBJS_KEY = "objects";

    @Override
    public void sessionCreated(HttpSessionEvent httpSessionEvent) {
        httpSessionEvent.getSession().setAttribute(CONTEXT_KEY, new SessionData());

        //this i used by the old tomee gui
        //TODO: remove me once the new gui is ready
        httpSessionEvent.getSession().setAttribute(OBJS_KEY, new HashMap<String, Object>());
    }
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.