|Eclipse 4 Context behaviour handling own @Creatable objects changed? [message #1729674]
||Sun, 17 April 2016 17:42
| Stefan Häusler
Registered: May 2013
we recently start evaluating switching from 4.5.0 to a 4.5.2 platform due to some waiting bugfixes. After doing this for our products, we observe some changes in the context how own objects annotated with @Creatable are created/reused for injection.
Lets assume we have a Wizard for which we also have a controller and a model. Both the controller and the model is annotated with @Creatable and injected into the wizard.
- We create the wizard with new Wizard()
- then using ContextInjectionFactory.inject
Before 4.5.2 it seems that the model was created each time team on injection. After going to 4.5.2, the first created object for @Creatable annotation is kept in the context and is reused when reopening the wizard what is a problem as the model still has state from previous session.
Is this intended? Is there some complete change log for the 4.5.2 where i can see the change explained? Are we doing something wrong here?
Actually we were already curious whether we do this correct in 4.5.0, as the context then starts to get bigger and bigger each time we reopened the wizard.
The use case here is actually, just to use the E4 Injection Framework for simple putting together the different objects. No need to hold references for the @Creatable. Of course the framework can not guess this, so the question was here already, what a pattern would be to work with the Context like this.
Maybe its more correct to annotate the wizard itself also with @Creatable and using constructor injection (maybe even a chid context that is disposed afterwards).
But i would like to understand the error here, because i start new things.
Thank you very much for an answer,
[Updated on: Sun, 17 April 2016 18:54]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01452 seconds