Having a single c'tor which expects both parameters will solve that issue, same as done for the commands.
Hi,
I got another bug about missing constructor:
public …(P parameters, EngineContext engineContext) {
super(parameters, engineContext);
}
so I looked into:
org.ovirt.engine.core.bll.QueriesCommandBase
and it seems, that sole 'problem' is with initialization of user in @PostConstruct method. It seems, that we can easily set all those fields via setters, and user initialization can be done later, for example before calling executeQueryCommand in:
org.ovirt.engine.core.bll.QueriesCommandBase#executeCommand
doing this will move us closer to CDI and avoid errors because of forgotten constructor. Is there a obstacle blocking us from doing this?
thanks,
Mar.
Edit: I had some time left so I tried to implement it, and it seems to be working. It's big patch, but mostly there's just constructors removal. Actual changes are in:
QueriesCommandBase
CommandsFactory
RegisterVdsQuery
GetAllTemplateBasedEntityQuery
GetAllInstanceTypesQuery
GetAllVmTemplatesQuery
GetAllImageTypesQuery
and test files.
_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel