Creates new {@link SessionFactory}.
<p>
<b>This method is protected only for testing</b>
333309
protected SessionFactory createSessionFactory( ConnectionProvider connectionProvider, RetryLogic retryLogic,
            Config config )
    {
        return new SessionFactoryImpl( connectionProvider, retryLogic, config );
    }
22489
@Override
    public Session createSession() throws JMSException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createSession");

        Session session = null;
        try {
            session = createSession(false, Session.AUTO_ACKNOWLEDGE);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createSession");
        }

        return session;
    }
439034
protected final CommPortConnectionFactory createCommPortConnectionFactory()
    {
        //create new instance
        CommPortConnectionFactory factory=(CommPortConnectionFactory)ReflectionHelper.createInstance(this.commConnectionFactoryClassName);
            
        //initialize
        factory.initialize(this);
        
        return factory;
    }
581322
@Override
    public Session createSession(int sessionMode) throws JMSException {

        Session session = null;

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "createSession", new Object[] { sessionMode });
        try {
            if (sessionMode == JMSContext.SESSION_TRANSACTED)
                session = createSession(true, sessionMode);
            else
                session = createSession(false, sessionMode);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "createSession");
        }
        return session;

    }
265108
@SuppressWarnings("unchecked")
	public void sessionCreated(HttpSessionEvent se) {
		Descriptor<? extends Context> descriptor = container.contexts().get(Session.class);
		
		if (descriptor != null) {
			WebContext<HttpSession> context = (WebContext<HttpSession>) container.component(descriptor);
			context.associate(se.getSession());
		}
	}
484752
protected final FactorySimple
    createPutFactorySimple(
      final Class<?> pBeanClass) throws Exception {
    FactorySimple factory = new FactorySimple();
    factory.setObjectClass(pBeanClass);
    //assigning fully initialized object:
    this.factoriesMap
      .put(pBeanClass, factory);
    return factory;
  }
308151
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ JsonElement.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return JsonElement.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
          (ContentHandle<C>) new GSONHandle() : null;
        return handle;
      }
    };
  }
406447
@Memoized
  Session session() {
    Session result = sessionFactory().create(this);
    provisioned = true;
    return result;
  }
368265
public SessionConfigType<WebAppDescriptor> getOrCreateSessionConfig()
   {
      List<Node> nodeList = model.get("session-config");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new SessionConfigTypeImpl<WebAppDescriptor>(this, "session-config", model, nodeList.get(0));
      }
      return createSessionConfig();
   }
1044594
public static SessionFactory newSessionFactory (
        final Class<? extends Credentials> credsClass,
        final Class<? extends PresentsSession> sessionClass,
        final Class<? extends Name> nameClass,
        final Class<? extends ClientResolver> resolverClass)
    {
        return new SessionFactory() {
            @Override public Class<? extends PresentsSession> getSessionClass (AuthRequest areq) {
                return credsClass.isInstance(areq.getCredentials()) ? sessionClass : null;
            }
            @Override
            public Class <? extends ClientResolver> getClientResolverClass (Name username) {
                return nameClass.isInstance(username) ? resolverClass : null;
            }
        };
    }
1077680
private SSLSocketFactory createFactory()
    throws Exception
  {
    SSLSocketFactory ssFactory = null;
    
    String host = "localhost";
    int port = 8086;
    
    if (_keyStore == null) {
      return createAnonymousFactory(null, port);
    }
    
    SSLContext sslContext = SSLContext.getInstance(_sslContext);

    KeyManagerFactory kmf
    = KeyManagerFactory.getInstance(keyManagerFactory());

    kmf.init(_keyStore, keyStorePassword().toCharArray());

    sslContext.init(kmf.getKeyManagers(), null, null);

    /*
      if (_cipherSuites != null)
        sslContext.createSSLEngine().setEnabledCipherSuites(_cipherSuites);

     */
    SSLEngine engine = sslContext.createSSLEngine();
    
    _enabledProtocols = enabledProtocols(engine.getEnabledProtocols());
    
    engine.setEnabledProtocols(_enabledProtocols);

    ssFactory = sslContext.getSocketFactory();
    
    return ssFactory;
  }
1060777
@SuppressWarnings("unchecked")
    public <P> P createBean(final Class<P> clazz) {
        return (P) beanFactory.create(clazz);
    }
508114
public FactoryFactory build() {
        return new FactoryFactory(
                getJceProvider(),
                getHttpClient(),
                getKeyCache(),
                getApiBaseURL(),
                getApiIdentifier(),
                getRequestExpireSeconds(),
                offsetTTL,
                currentPublicKeyTTL,
                entityKeyMap
        );

    }
1236896
public Invoker create(Object service, Invoker rootInvoker, SessionFactory sessionFactory) {

        ImmutableMap.Builder<String, UnitOfWork> unitOfWorkMethodsBuilder =
                new ImmutableMap.Builder<>();

        for (Method m : service.getClass().getMethods()) {
            if (m.isAnnotationPresent(UnitOfWork.class)) {
                unitOfWorkMethodsBuilder.put(m.getName(), m.getAnnotation(UnitOfWork.class));
            }
        }
        ImmutableMap<String, UnitOfWork> unitOfWorkMethods = unitOfWorkMethodsBuilder.build();

        Invoker invoker = rootInvoker;

        if (unitOfWorkMethods.size() > 0) {
            invoker = new UnitOfWorkInvoker(invoker, unitOfWorkMethods, sessionFactory);
        }

        return invoker;
    }
503336
public static <V> CmsBeanTableBuilder<V> newInstance(Class<V> cls, String view) {

        return new CmsBeanTableBuilder<V>(cls, view);

    }
239405
private static void createFactoryInstance() {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createFactoryInstance");
    try {
      Class cls = Class.forName(JS_MESSAGE_HANDLE_FACTORY_CLASS);
      instance = (JsMessageHandleFactory) cls.newInstance();
    }
    catch (Exception e) {
      FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.JsMessageHandleFactory.createFactoryInstance", "133");
      SibTr.error(tc,"UNABLE_TO_CREATE_HANDLEFACTORY_CWSIF0031",e);
      NoClassDefFoundError ncdfe = new NoClassDefFoundError(e.getMessage());
      ncdfe.initCause(e);
      throw ncdfe;
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createFactoryInstance");
  }
35852
public SipSession getSession(boolean create) {
		if(logger.isDebugEnabled()) {
			logger.debug("getSession - create=" + create);
		}

		MobicentsSipSession session = getSipSession();
		if (session == null && create) {
			MobicentsSipApplicationSession sipApplicationSessionImpl = (MobicentsSipApplicationSession)getSipApplicationSession(create);
                        if (sipApplicationSessionImpl != null) {
                            MobicentsSipSessionKey sessionKey = SessionManagerUtil.getSipSessionKey(sipApplicationSessionImpl.getKey().getId(), currentApplicationName, message, false);
                            session = sipApplicationSessionImpl.getSipContext().getSipManager().getSipSession(sessionKey, create,
                                            sipFactoryImpl, sipApplicationSessionImpl);
                            session.setSessionCreatingTransactionRequest(this);
                            session.setOrphan(isOrphan());
                            sessionKey = session.getKey();
                        }
		}

		if(session != null) {
			return session.getFacade();
		}
		if(logger.isDebugEnabled()) {
			logger.debug("getSession - returning null");
		}
		return null;
	}