Start this component and implement the requirements of org.apache.catalina.util.LifecycleBase#startInternal(). @exception LifecycleException if this component detects a fatal error that prevents this component from being used
()
| 709 | * used |
| 710 | */ |
| 711 | @Override |
| 712 | protected void startInternal() throws LifecycleException { |
| 713 | |
| 714 | reconfigureStartStopExecutor(getStartStopThreads()); |
| 715 | |
| 716 | // Start our subordinate components, if any |
| 717 | logger = null; |
| 718 | getLogger(); |
| 719 | Cluster cluster = getClusterInternal(); |
| 720 | if (cluster instanceof Lifecycle) { |
| 721 | ((Lifecycle) cluster).start(); |
| 722 | } |
| 723 | Realm realm = getRealmInternal(); |
| 724 | if (realm instanceof Lifecycle) { |
| 725 | ((Lifecycle) realm).start(); |
| 726 | } |
| 727 | |
| 728 | // Start our child containers, if any |
| 729 | Container[] children = findChildren(); |
| 730 | List<Future<Void>> results = new ArrayList<>(children.length); |
| 731 | for (Container child : children) { |
| 732 | results.add(startStopExecutor.submit(new StartChild(child))); |
| 733 | } |
| 734 | |
| 735 | MultiThrowable multiThrowable = null; |
| 736 | |
| 737 | for (Future<Void> result : results) { |
| 738 | try { |
| 739 | result.get(); |
| 740 | } catch (Throwable t) { |
| 741 | log.error(sm.getString("containerBase.threadedStartFailed"), t); |
| 742 | if (multiThrowable == null) { |
| 743 | multiThrowable = new MultiThrowable(); |
| 744 | } |
| 745 | multiThrowable.add(t); |
| 746 | } |
| 747 | |
| 748 | } |
| 749 | if (multiThrowable != null) { |
| 750 | throw new LifecycleException(sm.getString("containerBase.threadedStartFailed"), |
| 751 | multiThrowable.getThrowable()); |
| 752 | } |
| 753 | |
| 754 | // Start the Valves in our pipeline (including the basic), if any |
| 755 | if (pipeline instanceof Lifecycle) { |
| 756 | ((Lifecycle) pipeline).start(); |
| 757 | } |
| 758 | |
| 759 | setState(LifecycleState.STARTING); |
| 760 | |
| 761 | // Start our thread |
| 762 | if (backgroundProcessorDelay > 0) { |
| 763 | monitorFuture = Container.getService(ContainerBase.this).getServer().getUtilityExecutor() |
| 764 | .scheduleWithFixedDelay(new ContainerBackgroundProcessorMonitor(), 0, 60, TimeUnit.SECONDS); |
| 765 | } |
| 766 | } |
| 767 | |
| 768 |
nothing calls this directly
no test coverage detected