[CLOUDSTACK-10196] Remove ejb-api 3.0 dependency#2348
Conversation
414803d to
48838e9
Compare
marcaurele
left a comment
There was a problem hiding this comment.
Good cleanup - The @Component annotation is not enough, otherwise the custom spring context in CS does not know in which context to put the bean since there is a context tree structure to avoid overrides by plugins (https://cwiki.apache.org/confluence/display/CLOUDSTACK/Plug-ins%2C+Modules%2C+and+Extensions).
|
Ah yeah, actually that depends.. that is why I mentioned that @component or XML declaration is enough. @Local is from a whole different framework that may be seen as an alternative to Spring, and that we do not use. @marcaurele thanks for the review! |
|
Good cleanup, we'll need some extended testing on this one. |
|
@rafaelweingartner can you fix the conflicts? |
d2541d1 to
539edb3
Compare
|
@rhtyd done! |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1382 |
b28e519 to
36cb848
Compare
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1383 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1794)
|
|
LGTM, test LGTM as well. The failures are known issues. |
| } | ||
| }); | ||
|
|
||
| for (Long vmId : affectedVms) { |
There was a problem hiding this comment.
Because it was not making much sense to me; for every VM ID in affectedVms it executes an asynchronous task _executorPool.schedule(new WorkerThread(), delayMs, TimeUnit.MILLISECONDS);. The odd part is that the vmId is not used. All of the tasks are scheduled to be executed are the same.
Looking at com.cloud.network.security.SecurityGroupManagerImpl.work() closely, it seems that it is indeed used for something. I was expecting it to be a generic task where we send something to be computed on.
So, there this idea of security group work, and the guys that implemented this, probably wanted to execute/process a number of work that is equal to the number of affectedVms. It would have been clear if done in some other way… I will not refactor this.
I will re-added this bit again.
@rhtyd thanks for spotting that!
| } | ||
| } | ||
|
|
||
| private void processScheduledWork() { |
There was a problem hiding this comment.
The usage of this method is commented, should we remove that too or keep this?
There was a problem hiding this comment.
For me, code commented, dead codes, or code not used should always be deleted.
There was a problem hiding this comment.
Alright, see line 211 in CleanupThread, maybe remove the commented method as well?
|
@rafaelweingartner can you address outstanding queries, following which we can merge this. |
|
@rhtyd I replied your inquiries. Thanks for the feedback here! P.S. I am not able to squash the commits now. I will do that on Monday (maybe tomorrow in the evening with a bit of luck) |
|
@rafaelweingartner thanks, no need to squash yourself. I'll squash merge using Github. I'll re-review the changes, and kick another round of tests. |
|
LGTM |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1389 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1802)
|
f8ddc4b to
72a0466
Compare
|
@rhtyd commits squashed. |
72a0466 to
5f9cdf8
Compare
|
@rafaelweingartner do we have a jira ID for this? |
|
Hmm, no... |
I also Fixed QuotaAlertManagerImplTest, which was injecting mock objects manually
5f9cdf8 to
8b35da6
Compare
|
@rhtyd done |
|
Merged based on review and test results. |
This PR is proposing the removal of "ejb-api" 3.0 JAR. We use spring to manage objects creation and injection. Thus, spring beans do not need the annotation @Local. The @component or the bean declaration in the XML is enough to wire the object in Spring life-cycle.