Comments (11)
Per discussion in eclipse/microprofile-open-api#224 the resolution of this issue should be to put the RestClientBuilderResolver
(and any other SPI code) into a separate SPI artifact - so that vendors can implement this spec without allowing end-users to be able to call SPI methods.
from microprofile-rest-client.
CXF does not use the setInstance
method, so from that implementor's standpoint, it could be removed. It would be good to know whether other implementors use it or not.
We'd probably need to deprecate it first.
from microprofile-rest-client.
Any rational to keep this method since multiple threads qhowed osgi and other envs dont need it? Others are ok to extract even if pby overkill.
from microprofile-rest-client.
It's often the only way how to set a custom resolver in an OSGi environment. I think that @Emily-Jiang has some opinion about this. In Payara, the resolver is provided via the service loader mechanism.
from microprofile-rest-client.
@OndrejM I know it is what @Emily-Jiang keeps saying but this is not true and there are OSGi solution nowdays which avoid to break the API introducing some vendor specific implementations, please have a look to eclipse/microprofile#33 or geronimo which does it since almost 20 years without any need of API tweak.
from microprofile-rest-client.
I believe, @rmannibucau. I even think that the API doesn't need to support the service loader pattern, which is also impl-specific. The SPI package exists only to make it easier to create implementations. Maybe a better solution is to provide an SPI to provide an impl-specific extension, which could provide implementations in any way
from microprofile-rest-client.
Agree, if you think 2s about here is concrete status of that particular point:
- JavaEE always used SPI so MP "copied" that pattern but (point 2)
- MP is CDI centric so the way to have a SPI is to use CDI beans. MP API would provide an interface and the implementation would add a bean for that type. it works for 90% of the cases but the config one which is needed before the container is started but that's really all.
Sounds like a trivial fix, no?
from microprofile-rest-client.
It sounds OK to me to use CDI for providing implementations for specs that can rely on CDI. Most of them should except the config one you mentioned.
from microprofile-rest-client.
It is obvious from the discussion in eclipse/microprofile-open-api#224 that this pattern is used in many other specs (config, REST client, openapi). This should then be discussed on a higher level at the architecture board. I raised an issue here: eclipse/microprofile#43
from microprofile-rest-client.
close this as it has been resolved. Please reopen if you think otherwise.
from microprofile-rest-client.
Hmm, AFAIK there is no change in the API and the buggy method is still surfacing so this issue is still valid since:
- in terms of design it creates inconsistencies with CDI depending the environment (in OSGi-CDI for ex the classloading is not sufficient so if it would use CDI there wouldn't be any issue but there it is random)
- it is not generally working since it can be called any time and a consumer code can get the unexpected resolver
- as originally mentionned it is a design bug of a few spec but since MP is CDI centric there is no real reason to keep this broken pattern in the spec so the method should be deprecated and implemented as a noop when possible (to not break compilation immediately) then dropped in a few versions IMHO
from microprofile-rest-client.
Related Issues (20)
- TCK Challenge: HasConversationScopeTest HOT 5
- Have string overloaded methods for uri/url methods HOT 3
- Allow ResponseExceptionMapper to swallow exceptions HOT 4
- MicroProfile Rest Client 3.0 Compatible Certification Request
- The 3.0 TCK Relies on old Jakarta/Java EE Servlet Specification HOT 2
- MicroProfile Rest Client 3.0 release on Maven Central? HOT 2
- MicroProfile Rest Client 2.0 Compatible Certification Request - Payara Community 5.2021.10 HOT 1
- Setting SSLContext for CDI injected clients HOT 3
- Clarification for behavior of Default ResponseExceptionMapper when method signature returns Result HOT 3
- Replace javax namespace usage with jakarta HOT 1
- Fault Tolerance support in builder created client HOT 4
- Clarification about closing the rest client HOT 2
- [question] Can I build a new implementation for microprofile-rest-client? HOT 3
- RestClientBuilderResolver does not work when the security manager is enabled
- Clarify What Exceptions Can Be Thrown When Closing A Client HOT 5
- ClientRequestFilter and ClientResponseFilter priority tests absent from MP Rest Client TCK HOT 1
- Align with Jakarta EE 10
- ConfigKeyForMultipleInterfacesTest uses the same WAR file name as ConfigKeyTest HOT 4
- Can we wrap all parameters including body parameter into a single object ? HOT 4
- No TCK coverage for exception mappers when subresource interface methods are called
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microprofile-rest-client.