OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 591 forks source link

[spring boot feature] warm start uses old server configuration from previous launch #2651

Closed tjwatson closed 6 years ago

tjwatson commented 6 years ago

When starting from a warm pre-populated cache it looks like the configuration admin is still using old configurations which were configured by using a OSGI-INF/wlp/defaultInstances.xml file (see com.ibm.ws.app.manager.springboot.internal.SpringBootApplicationImpl.SpringBootConfigImpl.installVirtualHostBundle(Bundle, ServerConfiguration)). This should not happen because we uninstall the bundle which contains the configuration when the application is stopped. We also look for any configuration bundles when the handler is activated and uninstall any that may have been left behind before starting the applications.

There may be something being cached in the configuration admin service which is not getting cleaned up properly when the configuration bundles are uninstalled.

The improper behavior that can be observed is that the web container reports that a web application is available at a specific URI before the spring application context has been fully initialized. We must not start listening on the endpoint for the application until the spring application context is fully initialized.

tjwatson commented 6 years ago

This is merged into master now.