public SipApplicationSession createApplicationSessionByAppName( String sipAppName, boolean isContainerManaged) { if (logger.isDebugEnabled()) { logger.debug("Creating new application session for application name " + sipAppName); } SipContext sipContext = sipApplicationDispatcher.findSipApplication(sipAppName); if(sipContext == null) { throw new IllegalArgumentException("The specified application "+sipAppName+" is not currently deployed"); } MobicentsSipApplicationSession sipApplicationSession = createApplicationSession(sipContext); // make sure to acquire this app session and add it to the set of app sessions we monitor in the context of the application // to release them all when we exit application code sipContext.enterSipApp(sipApplicationSession, null, true, isContainerManaged); return sipApplicationSession; }