(String sessionId)
| 713 | |
| 714 | |
| 715 | @Override |
| 716 | public Session createSession(String sessionId) { |
| 717 | |
| 718 | if ((maxActiveSessions >= 0) && (getActiveSessions() >= maxActiveSessions)) { |
| 719 | rejectedSessions++; |
| 720 | throw new TooManyActiveSessionsException(sm.getString("managerBase.createSession.ise"), maxActiveSessions); |
| 721 | } |
| 722 | |
| 723 | // Recycle or create a Session instance |
| 724 | Session session = createEmptySession(); |
| 725 | |
| 726 | // Initialize the properties of the new session and return it |
| 727 | session.setNew(true); |
| 728 | session.setValid(true); |
| 729 | session.setCreationTime(System.currentTimeMillis()); |
| 730 | session.setMaxInactiveInterval(getContext().getSessionTimeout() * 60); |
| 731 | String id = sessionId; |
| 732 | if (id == null) { |
| 733 | id = generateSessionId(); |
| 734 | } |
| 735 | session.setId(id); |
| 736 | |
| 737 | SessionTiming timing = new SessionTiming(session.getCreationTime(), 0); |
| 738 | synchronized (sessionCreationTiming) { |
| 739 | sessionCreationTiming.add(timing); |
| 740 | sessionCreationTiming.poll(); |
| 741 | } |
| 742 | return session; |
| 743 | } |
| 744 | |
| 745 | |
| 746 | @Override |
nothing calls this directly
no test coverage detected