private void makeLocal(String sessionId) {
    try {
      // this is APP session, always
      Class<? extends AppSession> appSessionInterfaceClass =
          AppSessionDataReplicatedImpl.getAppSessionIface(this.mobicentsCluster.getMobicentsCache(), sessionId);
      // get factory;
      // FIXME: make it a field?
      IAppSessionFactory fct = ((ISessionFactory) this.container.getSessionFactory()).getAppSessionFactory(appSessionInterfaceClass);
      if (fct == null) {
        logger.warn("Session with id:{}, is in replicated data source, but no Application Session Factory for:{}.", sessionId, appSessionInterfaceClass);
        return;
      }
      else {
        BaseSession session = fct.getSession(sessionId, appSessionInterfaceClass);
        this.localDataSource.addSession(session);
        // hmmm
        this.localDataSource.setSessionListener(sessionId, (NetworkReqListener) session);
        return;
      }
    }
    catch (IllegalDiameterStateException e) {
      if (logger.isErrorEnabled()) {
        logger.error("Failed to obtain factory from stack...");
      }
    }
  }
private void makeLocal ( String sessionId ) { try { Class < ? extends AppSession > appSessionInterfaceClass = AppSessionDataReplicatedImpl . getAppSessionIface ( this . mobicentsCluster . getMobicentsCache ( ) , sessionId ) ; IAppSessionFactory fct = ( ( ISessionFactory ) this . container . getSessionFactory ( ) ) . getAppSessionFactory ( appSessionInterfaceClass ) ; if ( fct == null ) { logger . warn ( "Session with id:{}, is in replicated data source, but no Application Session Factory for:{}." , sessionId , appSessionInterfaceClass ) ; return ; } else { BaseSession session = fct . getSession ( sessionId , appSessionInterfaceClass ) ; this . localDataSource . addSession ( session ) ; this . localDataSource . setSessionListener ( sessionId , ( NetworkReqListener ) session ) ; return ; } } catch ( IllegalDiameterStateException e ) { if ( logger . isErrorEnabled ( ) ) { logger . error ( "Failed to obtain factory from stack..." ) ; } } }
@param sessionId