[MGNLREST-260] Rest client definition in 6.2 incompatible with its older versions Created: 13/Jul/20 Updated: 24/Jul/20 Resolved: 24/Jul/20 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Viet Nguyen | Assignee: | Unassigned |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Date of First Response: | |||||
| Description |
|
Customers who is using Rest Client module in prior versions than 6.2 need to update all their definitions for 6.2 working. |
| Comments |
| Comment by Mercedes Iruela [ 20/Jul/20 ] |
|
Tested on 6.2.1 that it is working as expected, old rest client are registered, in addition, the services are accesible via Java using info.magnolia.rest.client.factory.RestClientFactory:
<SERVICE_INTERFACE_CLASS> service= restClientFactory
.createClient(this.restClientRegistry.getProvider("<REST_CLIENT_NAME>").get())
.proxy(<SERVICE_INTERFACE_CLASS>.class);
|
| Comment by Gonzalo Rodríguez [ 21/Jul/20 ] |
|
Hello, We have tested and the public part works correctly, but the junit tests do not pass, it returns the following error, I do not know how we would have to change to be able to run the junit tests. testGetInstance(org.mgnl.ob.backend.rest.CustomerCareKnowledgeApiServiceTest) Time elapsed: 2.8 sec <<< ERROR! On the other hand, there is a warning saying that it is necessary to close the clients, is this necessary? At what point should we close the client? 2020-07-21 10:54:09,135 WARN org.jboss.resteasy.client.jaxrs.i18n : RESTEASY004687: Closing a class org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine instance for you. Please close clients yourself. I attach the junit class and the service classes Regards, Gonzalo. |
| Comment by Mercedes Iruela [ 24/Jul/20 ] |
|
Hi Gonzalo, Here you can find examples that I think that could help: https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/browse/magnolia-rest-client/src/test/java/info/magnolia/rest/client/integration/RestClientIntegrationTest.java BTW, I am closing this ticket since it is not an issue. Regards, |