MCPcopy Create free account
hub / github.com/apache/tomcat / startInternal

Method startInternal

java/org/apache/catalina/session/ManagerBase.java:642–684  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

640
641
642 @Override
643 protected void startInternal() throws LifecycleException {
644
645 // Ensure caches for timing stats are the right size by filling with
646 // nulls.
647 synchronized (sessionCreationTiming) {
648 while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
649 sessionCreationTiming.add(null);
650 }
651 }
652 synchronized (sessionExpirationTiming) {
653 while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
654 sessionExpirationTiming.add(null);
655 }
656 }
657
658 /* Create sessionIdGenerator if not explicitly configured */
659 SessionIdGenerator sessionIdGenerator = getSessionIdGenerator();
660 if (sessionIdGenerator == null) {
661 sessionIdGenerator = new StandardSessionIdGenerator();
662 setSessionIdGenerator(sessionIdGenerator);
663 }
664
665 sessionIdGenerator.setJvmRoute(getJvmRoute());
666 if (sessionIdGenerator instanceof SessionIdGeneratorBase sig) {
667 sig.setSecureRandomAlgorithm(getSecureRandomAlgorithm());
668 sig.setSecureRandomClass(getSecureRandomClass());
669 sig.setSecureRandomProvider(getSecureRandomProvider());
670 }
671
672 if (sessionIdGenerator instanceof Lifecycle) {
673 ((Lifecycle) sessionIdGenerator).start();
674 } else {
675 // Force initialization of the random number generator
676 if (log.isTraceEnabled()) {
677 log.trace("Force random number initialization starting");
678 }
679 sessionIdGenerator.generateSessionId();
680 if (log.isTraceEnabled()) {
681 log.trace("Force random number initialization completed");
682 }
683 }
684 }
685
686
687 @Override

Callers

nothing calls this directly

Calls 15

getSessionIdGeneratorMethod · 0.95
setSessionIdGeneratorMethod · 0.95
setJvmRouteMethod · 0.95
getJvmRouteMethod · 0.95
getSecureRandomClassMethod · 0.95
generateSessionIdMethod · 0.95
addMethod · 0.65
startMethod · 0.65
isTraceEnabledMethod · 0.65
traceMethod · 0.65

Tested by

no test coverage detected