Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The current revision of the code (662145) creates the configuration, and returns true.
else if ( request.getParameter( "create" ) != null )
{ // pid is a factory PID and we have to create a new configuration // we should actually also display that one ! Configuration config = ca.createFactoryConfiguration( pid, null ); // request.setAttribute(ATTR_REDIRECT_PARAMETERS, "pid=" + // config.getPid()); return true; }The problem with this approach is the fact that in many cases the Configuration instance will not be persisted or available until the update() method is used to set new properties.
Based on the fact that the "create" action may be called already with a complete set of properties edited in the form, I would suggest to only differentiate between factory "create" and "save" in the way the Configuration instance is created. i.e.:
if ( request.getParameter( "create" ) != null )
{
// pid is a factory PID and we have to create a new configuration
config = ca.createFactoryConfiguration( pid, null );
} else {
// pid is managed service, get configuration
config = ca.getConfiguration( pid, null );
}
Attachments
Attachments
Issue Links
- is depended upon by
-
FELIX-585 org.apache.felix.webconsole.internal.compendium.ConfigManager.listConfigurations(): Configuration instances for ManagedServiceFactoy instances cause IllegalArgumentException
- Closed
-
FELIX-586 org.apache.felix.webconsole.internal.compendium.BaseConfigManager.getAttributeDefinitionMap(): implementation does not properly handle Configuration instances of a ManagedServiceFactory
- Closed
-
FELIX-587 org.apache.felix.webconsole.internal.compendium.AjaxConfigManagerAction.configForm(): Configuration instance for a ManagedServiceFactory will cause Exception
- Closed