MyDslValidator instances between different injectos #3426
Unanswered
AhmedMahmoud98
asked this question in
Q&A
Replies: 1 comment 13 replies
-
|
this is intentional. also how the validation registry deals with them.
are better options for caching |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
In my Xtext project, I'm defining MyDslValidator class with some custom @check methods. MyDslValidator Class is binded at RuntimeModule as follows:
I've a problem, whatever injector is used. And although multiple instances of the MyDslValidator class are created per injector, always the first created instance is executed, which is something that I want to avoid, as somehow I want to keep some state and It's different for different injectors/runs.
I suspect that @SingletonBinding(eager=true) Annotation could be the problem, but removing it or setting eager to false prevents MyDslValidator from being executed at all. Could you please help to ensure that the MyDslValidator instance isn't cached somewhere, and the newly created instance is executed and not always the first one?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions