commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CONFIGURATION-203) Make Configuration Serializable
Date Thu, 23 Apr 2009 06:10:47 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701819#action_12701819
] 

Oliver Heger commented on CONFIGURATION-203:
--------------------------------------------

John, I agree with most of your points.

However, I wonder whether we really can make a concrete Configuration implementation serializable.
The problem is that each important implementation is associated with a bunch of helper objects
like interpolators, lookups, expression strategies, etc. Many of these objects would have
to be made serializable, too, and its questionable whether this is feasible or even desired.

Maybe we need a different approach. One way could be to have a method like {{Serializable
getContent()}} in the {{Configuration}} interface. This method would return a serializable
object storing the pure data of the configuration. In addition, concrete Configuration implementations
could define a constructor that takes a {{Serializable}} object and initializes the configuration
with this data.

Based on this mechanism we could define a "canonical configuration serialization format",
probably XML-based as XML is capable of storing all the hierarchical structure. This would
allow for easy data conversion, e.g. the data from a {{PropertiesConfiguration}} is fetched
and then an {{XMLConfiguration}} is constructed with it.

Of course, this is not as convenient as serializing {{Configuration}} objects directly. But
maybe it's the closest thing we can get?

> Make Configuration Serializable
> -------------------------------
>
>                 Key: CONFIGURATION-203
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-203
>             Project: Commons Configuration
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Joe Wolf
>            Priority: Minor
>             Fix For: 1.7
>
>
> It would be nice if org.apache.commons.configuration.Configuration extended java.io.Serializable
and its implementations were serializable as well.  Theoretically, most configurations are
constructed from "serialized" data sources.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message