Allow configuring the CDI scope of configured clients
Right now, configured typesafe clients are always a Singleton (which also prevents mocking them!), dynamic clients are Dependent
REST Client allows configuring the scope, so we should probably do the same
We have the same problem, and it cause hibernate session holding all the time(a Singleton every request). So when it can be fix ^_^
I'm fine with a hard dependency on CDI, but we tried to avoid until now. Or do you think we can still keep it optional?
I'm fine with a hard dependency on CDI, but we tried to avoid until now. Or do you think we can still keep it optional?
I'm so appreciate it if it can be optional. Because some other lib is stateful like hibernate. CDI can't be avoided if we use these stateful lib.
I haven't gotten around to it yet. You're welcome to work on it if you wish ;) I think CDI can still remain optional for the client library with this (the scope will just be ignored)