Fix memory leak (#6075)

* Fix memory leak

beanManager was set to threadLocal from a configurator that was post-init 
after the ComponentProvider configurator which is supposed to free the thread local. The beanManager  thread local was never removed afterwards.
I switched the order of calling post-init so that configurators go in reversed order compared to calling init

* Fix memory leak - fix failing tests

Revert the change to run postInit on all configurators in reversed order. Instead run postInit only on the specific Component configurator last, while initialize runs in the original order. This cleans up thread locals safely, without changing the order of other configurators, which was breking other functionality.
1 file changed
tree: 2a16d53a793f226402aa198ed35fd4ab40e69010
  1. .github/
  2. archetypes/
  3. bom/
  4. bundles/
  5. connectors/
  6. containers/
  7. core-client/
  8. core-common/
  9. core-server/
  10. docs/
  11. etc/
  12. examples/
  13. ext/
  14. incubator/
  15. inject/
  16. media/
  17. security/
  18. test-framework/
  19. tests/
  20. tools/
  21. .gitignore
  22. .travis.yml
  23. CONTRIBUTING.md
  24. LICENSE.md
  25. NOTICE.md
  26. pom.xml
  27. README.md
README.md

Build Status  EPL-2.0  GPL+CPE-2.0

About Jersey

Jersey is a REST framework that provides JAX-RS Reference Implementation and more. Jersey provides its own APIs that extend the JAX-RS toolkit with additional features and utilities to further simplify RESTful service and client development. Jersey also exposes numerous extension SPIs so that developers may extend Jersey to best suit their needs.

Goals of Jersey project can be summarized in the following points:

  • Track the JAX-RS API and provide regular releases of production quality Reference Implementations that ships with GlassFish;
  • Provide APIs to extend Jersey & Build a community of users and developers; and finally
  • Make it easy to build RESTful Web services utilising Java and the Java Virtual Machine.

Licensing and Governance

Jersey is licensed under a dual license - EPL 2.0 and GPL 2.0 with Class-path Exception. That means you can choose which one of the two suits your needs better and use it under those terms.

We use contribution policy, which means we can only accept contributions under the terms of ECA.

More Information on Jersey

See the Jersey website to access Jersey documentation. If you run into any issues or have questions, ask at jersey-dev@eclipse.org (need to subscribe first), StackOverflow or file an issue on Jersey GitHub Project. You can follow us on Twitter, too.