Hi Andreas Brunnert First thing I see in the example is that you are injecting Instance<CDIInterface> into servlet and CDIInterface is in a @Dependent bean. When you call Instance.get() on dependent bean you always get new instance, that much is expected. And lifecycle of dependent bean depends on the lifecycle of object you injected it into - servlet. So I'd say it's expected that such bean lives as long as servlet does (unless you handle destroying those beans) Is this intended behaviour in your application? |