Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043538Openbravo ERPA. Platformpublic2020-03-23 09:122020-03-28 10:40
caristu 
platform 
highminorhave not tried
newopen 
5
 
 
Core
No
0043538: Implement usage of "singleton" element for the REST web services
As explained in the wiki[1] REST web services are registered through a configuration file. This configuration file can include field named "singleton" which currently is ignored.

This means that on each request executed for a REST web service in particular, a new instance of the related web service class is being created.

[1] http://wiki.openbravo.com/wiki/How_to_create_a_new_REST_webservice#Registering_the_webservice [^]
In description
a) Make use of the singleton element here[2] to create a Registration class which uses the same instance of the web service when singleton is true.

b) Instantiate the class using weld. In this case, we would not use the singleton element at all and we would annotate it as @ApplicationScoped instead. See 0041479.

[2] https://code.openbravo.com/erp/devel/pi/file/tip/src/org/openbravo/base/provider/OBProviderConfigReader.java#l70 [^]
No tags attached.
related to design defect 0041479 new caristu Classes implementing WebService interface can not use CDI automatically 
Issue History
2020-03-23 09:12caristuNew Issue
2020-03-23 09:12caristuAssigned To => platform
2020-03-23 09:12caristuModules => Core
2020-03-23 09:12caristuTriggers an Emergency Pack => No
2020-03-23 09:12caristuRelationship addedrelated to 0041479
2020-03-23 09:12caristuDescription Updatedbug_revision_view_page.php?rev_id=20578#r20578
2020-03-23 09:13caristuProposed Solution updated
2020-03-23 09:14caristuSummaryImplement usage of singleton element for the REST web services => Implement usage of "singleton" element for the REST web services
2020-03-23 09:14caristuDescription Updatedbug_revision_view_page.php?rev_id=20579#r20579
2020-03-28 10:40caristuProposed Solution updated

There are no notes attached to this issue.