public class WebApp extends Object
WebApp optionally starts the Hypersistence Optimizer WebApp inside the
host application, so the events can be visualized without deploying a separate process.
It reuses the host application's Hibernate connection provider (via
HostWebAppConnectionProvider), so the web app reads the events with the very same
database credentials and connection pool as the application, and it binds an embedded HTTP server
(by default on a dynamically-allocated free port on localhost), logging the resulting URL.
Like the rest of the event persistence feature, it is fully failure-isolated: any problem while starting the web app is logged and never propagated to the host application.
| Constructor and Description |
|---|
WebApp(EventPersistenceSettings settings) |
| Modifier and Type | Method and Description |
|---|---|
String |
getUrl()
Get the URL the web app is available at, or
null if it is not running. |
void |
start()
Start the web app, if it is not already running.
|
void |
stop()
Stop the web app, if it is running.
|
public WebApp(EventPersistenceSettings settings)
public void start()
Config.EventPersistence#setWebAppEnabled setting only controls whether the bootstrap
starts it automatically; calling this method always starts it.
Never throws; failures are logged and the web app simply stays down.public String getUrl()
null if it is not running.nullpublic void stop()
Copyright © 2026. All rights reserved.