<< Back to previous view

[QB-1863] Rest resource contribution will be ignored if corresponding plugin is disabled but then enabled after a RESTful call
Created: 26/Nov/13  Updated: 14/Dec/13

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 5.1.0
Fix Version/s: 5.1.1, 5.1.3

Type: Bug Priority: Major
Reporter: Robin Shen Assigned To: Unassigned
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown


 Description   
I have a problem with RestResourceContribution.
I am trying to serve some REST API using RestResourceContribution, but it's implemented classes seem like be loaded only on server starting time and at that time server loads only enabled plugins.
This is problematic because when plugin setting class have @NotNull fields it will be not enabled at the first time it loaded. And if some other REST APIs get called before this plugin enabled, then my REST API cannot be added to servlet because jersey client already instantiated.

What I mean is that :
RestModule.getClasses() -> pluginManager.getExtensions(RestResourceContribution.class) -> this only load enabled RestResourceContribution plugins and if other REST API is called before my plugin is enabled, my REST API cannot be added to servlet provider.

So how about add RestResourceContribution dedicated function on PluginManager :

public <T> List<T> getExtensions(RestResourceContribution extensionPoint) {
// do not check if plugin enabled or not.
}
Generated at Thu May 16 10:58:43 UTC 2024 using JIRA 189.