Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034566Openbravo ERPA. Platformpublic2016-11-17 16:202019-07-30 10:01
caristu 
caristu 
highminoralways
closedfixed 
5
 
3.0PR17Q1 
alostale
Core
No
0034566: Classes implementing Process interface can not use CDI automatically
Those classes that implement the org.openbravo.scheduling.Process interface can not use CDI automatically: tt is not possible to inject elements because they are instantiated in a non-Weld way[1].


[1] https://code.openbravo.com/erp/devel/pi/file/addd2c050ac7/src/org/openbravo/scheduling/ProcessRunner.java#l58 [^]
In description
Instantiate classes implementing Process using weld, in a similar way to what it is done for action handler based processes.

Attached a proposed solution to be tested in deep.
No tags attached.
related to design defect 0035584 closed platform It is not possible to use Dependency Injection using Weld in background DalBaseProcess 
related to defect 0034567 closed Triage Omni WMS InventoryCountProcess does not support dependency injection 
related to design defect 0034174 new guillermogil Allow to use Weld on Background processes that extend from DalBaseProcess 
related to design defect 0041479 new caristu Classes implementing WebService interface can not use CDI automatically 
diff 34566.diff (742) 2016-11-17 16:21
https://issues.openbravo.com/file_download.php?file_id=10064&type=bug
Issue History
2016-11-17 16:20caristuNew Issue
2016-11-17 16:20caristuAssigned To => platform
2016-11-17 16:20caristuModules => Core
2016-11-17 16:20caristuTriggers an Emergency Pack => No
2016-11-17 16:21caristuFile Added: 34566.diff
2016-11-17 16:22caristuProposed Solution updated
2016-11-17 16:30JONHMRelationship addedrelated to 0034567
2016-11-25 14:10hgbotCheckin
2016-11-25 14:10hgbotNote Added: 0091845
2016-11-25 14:10hgbotStatusnew => resolved
2016-11-25 14:10hgbotResolutionopen => fixed
2016-11-25 14:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4d1741a4d62dba5c0bed9ca3cf6dbce8f69c46c1 [^]
2016-11-25 14:11caristuReview Assigned To => alostale
2016-12-12 09:00caristuAssigned Toplatform => caristu
2016-12-13 10:58hgbotCheckin
2016-12-13 10:58hgbotNote Added: 0092303
2016-12-13 11:01alostaleNote Added: 0092304
2016-12-13 11:01alostaleStatusresolved => closed
2016-12-13 11:01alostaleFixed in Version => 3.0PR17Q1
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092662
2016-12-16 18:39hudsonbotCheckin
2016-12-16 18:39hudsonbotNote Added: 0092701
2017-03-27 08:52dmiguelezRelationship addedhas duplicate 0035584
2017-03-28 09:37caristuRelationship deletedhas duplicate 0035584
2017-03-28 09:38caristuRelationship addedrelated to 0035584
2017-10-11 18:54caristuRelationship addedrelated to 0034174
2019-07-30 10:01caristuIssue cloned0041479
2019-07-30 10:01caristuRelationship addedrelated to 0041479

Notes
(0091845)
hgbot   
2016-11-25 14:10   
Repository: erp/devel/pi
Changeset: 4d1741a4d62dba5c0bed9ca3cf6dbce8f69c46c1
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Nov 25 14:05:04 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4d1741a4d62dba5c0bed9ca3cf6dbce8f69c46c1 [^]

fixes issue 34566: Classes implementing Process can not use CDI automatically

Now classes implementing org.openbravo.scheduling.Process interface are instantiated using Weld. This allows the usage of CDI with them.

---
M modules/org.openbravo.base.weld/src/META-INF/beans.xml
M src-test/src/org/openbravo/test/scheduling/ProcessSchedulingTest.java
M src/org/openbravo/scheduling/ProcessRunner.java
---
(0092303)
hgbot   
2016-12-13 10:58   
Repository: erp/devel/pi
Changeset: c245ed30a297e3c3d60edbe0f31990e32635defc
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 13 10:58:10 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c245ed30a297e3c3d60edbe0f31990e32635defc [^]

related to issue 34566: added test case for bg process using CDI

---
M src-test/src/org/openbravo/test/scheduling/ProcessSchedulingTest.java
---
(0092304)
alostale   
2016-12-13 11:01   
Code reviewed

Added test case to cover this functionallity
(0092662)
hudsonbot   
2016-12-16 18:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test
(0092701)
hudsonbot   
2016-12-16 18:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/dc8bf00badd0 [^]
Maturity status: Test