Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encapsulate Application related services inside application #7966

Open
rymsha opened this issue Mar 20, 2020 · 1 comment
Open

Encapsulate Application related services inside application #7966

rymsha opened this issue Mar 20, 2020 · 1 comment
Assignees

Comments

@rymsha
Copy link
Contributor

rymsha commented Mar 20, 2020

Currently Application is a separate entity which uses Bundle, which causes a few issues
Locales, Resources and Nashorn engines, Tasks etc... live its own life and require special care when application started/updated/stopped.
Partially it is done with ApplicationInvalidator listeners, but they are asynchronous and concurrent.
Partially it is done via ConcurrentHashMap.compute* but it is deadlock prone.
Both ApplicationInvalidator and ConcurrentHashMap use application name as a key.
Most issues arise when application gets updated because two equally named bundles "coexist" in in-flight events. One tries to stop and cleanup, another tries to start and boostrap.

If application encapsulates all its services than we don't need the invalidation logic. Locale cache, Resources, Nashorn Engine and task executors will be garbage collected together with Application instance.

@rymsha rymsha changed the title Encapsulate Application inside bundle Encapsulate Application related services inside application Mar 20, 2020
@rymsha rymsha self-assigned this Apr 17, 2020
@rymsha
Copy link
Contributor Author

rymsha commented Apr 17, 2020

Issues like #7994 #7925 #6608 #6667 #7821 #7842 wont even appear (probably)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant