[ 
https://issues.apache.org/jira/browse/GEODE-7229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969417#comment-16969417
 ] 

Darrel Schneider commented on GEODE-7229:
-----------------------------------------

To make it easier to configure a ReflectionBasedAutoSerializer, an 
"autoSerializer" attribute will be added to the "Pdx" configuration class.
The autoSerializer will have two attributes of its own: "portable" is true or 
false; "patterns" is a list of regex used to match the classes.
When creating a pdx config with an autoSerializer the only requirement will be 
that the autoSerializer has at least one pattern.
It is an error to specify both an "autoSerializer" and a "pdxSerializer" on the 
Pdx.

Also the "persistent" attribute will be removed from the Pdx configuration 
class since it is implied by the "diskStoreName" attribute. 

> v2 rest api should make it easier to use the pdx ReflectionBasedAutoSerializer
> ------------------------------------------------------------------------------
>
>                 Key: GEODE-7229
>                 URL: https://issues.apache.org/jira/browse/GEODE-7229
>             Project: Geode
>          Issue Type: Improvement
>          Components: management
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>
> gfsh configure pdx makes it somewhat easy to configure the 
> ReflectionBasedAutoSerializer. All you need to do is give say 
> --auto-serializable-classes=PATTERN and any classes that match PATTERN will 
> be auto serialized with pdx.
> Currently the v2 api requires that you set the Pdx.setPdxSerializer to a 
> ClassName instance whose name is 
> "org.apache.geode.pdx.ReflectionBasedAutoSerializer" and whose Properties 
> contain one with the key "classes" and the value PATTERN.
> The v2 rest api should make it at least as easy as gfsh and it could probably 
> make it even easier. We should consider making the auto serializer the 
> default if pdx is being configured. The only issue with this is the auto 
> serializer needs to know which classes it should serialize and which it 
> should leave alone. So just giving it the pattern ".*" could cause jdk and 
> other framework classes to be serialized as pdx instead of just the domain 
> classes.
> Another thing that makes it more complicated with gfsh is it has two options; 
> one for auto-serializable-classes and another for 
> "--portable-auto-serializable-classes". This makes the command line look more 
> complicated then it should be. I think we could instead just have the auto 
> serializer pattern and then another boolean attribute that says if the auto 
> serializer should check that the classes are portable. The whole portable 
> thing has to do with making sure all the fields can be converted to the 
> native client. Perhaps we don't need to expose this boolean if we now thing 
> it should always be true or false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to