public SipApplicationSession createApplicationSessionByKey( String sipApplicationKey, boolean managed) { MobicentsSipApplicationSession sipApplicationSessionImpl = null; // make sure we don't create a new sip app session if the http session has already one associated HttpSession httpSession = threadLocalHttpSession.get(); if(httpSession != null) { ConvergedSession convergedSession = (ConvergedSession) httpSession; sipApplicationSessionImpl = convergedSession.getApplicationSession(false); } if(sipApplicationSessionImpl == null) { sipApplicationSessionImpl = (MobicentsSipApplicationSession) ((SipSessionsUtilExt)sipContext.getSipSessionsUtil()).getApplicationSessionByKey(sipApplicationKey, true, managed); associateHttpSession(sipApplicationSessionImpl); } return sipApplicationSessionImpl; }
public SipApplicationSession createApplicationSession(boolean managed) { MobicentsSipApplicationSession sipApplicationSessionImpl = null; HttpSession httpSession = threadLocalHttpSession.get(); // make sure we don't create a new sip app session if the http session has already one associated if(httpSession != null) { ConvergedSession convergedSession = (ConvergedSession) httpSession; sipApplicationSessionImpl = convergedSession.getApplicationSession(false); } if(sipApplicationSessionImpl == null) { sipApplicationSessionImpl = (MobicentsSipApplicationSession)sipFactoryImpl.createApplicationSessionByAppName(sipContext.getApplicationName(), managed); associateHttpSession(sipApplicationSessionImpl); } return sipApplicationSessionImpl; }