[jboss-jira] [JBoss JIRA] (DROOLS-1629) PersisteHelper and ObjectMarshallingStrategyStore are mixing ObjectMarshallingStrategies

Manuel Castro (JIRA) issues at jboss.org
Tue Jun 27 11:39:00 EDT 2017


    [ https://issues.jboss.org/browse/DROOLS-1629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427616#comment-13427616 ] 

Manuel Castro commented on DROOLS-1629:
---------------------------------------

Hi Mario, I will do it, but this week I'm on holidays so will be requesting it next week.
Regards.


El 27/6/2017 9:33, "Mario Fusco (JIRA)" <issues at jboss.org> escribió:




	[1]Mario Fusco commented on [2]DROOLS-1629


 


[3]Re: PersisteHelper and ObjectMarshallingStrategyStore are mixing ObjectMarshallingStrategies 




[4]Manuel Castro Are you still going to send your pull request against master?




[5]	[6]Add Comment
 


This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d)	



----------------------------------------------------------------------------------------
[1] https://issues.jboss.org/secure/ViewProfile.jspa?name=mfusco
[2] https://issues.jboss.org/browse/DROOLS-1629
[3] https://issues.jboss.org/browse/DROOLS-1629
[4] https://issues.jboss.org/secure/ViewProfile.jspa?name=ngs_mtech
[5] https://issues.jboss.org/browse/DROOLS-1629#add-comment
[6] https://issues.jboss.org/browse/DROOLS-1629#add-comment


> PersisteHelper and ObjectMarshallingStrategyStore are mixing ObjectMarshallingStrategies
> ----------------------------------------------------------------------------------------
>
>                 Key: DROOLS-1629
>                 URL: https://issues.jboss.org/browse/DROOLS-1629
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine, kie server
>    Affects Versions: 6.4.0.Final, 6.5.0.Final
>            Reporter: Manuel Castro
>            Assignee: Mario Fusco
>   Original Estimate: 3 days
>  Remaining Estimate: 3 days
>
> We are defining our custom JPAPlaceHolderResolverStrategy, parametrizing the constructuctor with the persistence unit name it handles.
> When we need two of them to handle different kind of Entities probably from different DataSources, the marshalling process works properly as calling to accept method before marshalling returns true for the correct ObjectMarshallingStrategy.
> The problem occurs while unmarshalling the entities. As the class name is being used to find the correct ObjectMarshallingStrategy from the store, the class name matches two Object Marshalling Strategies, so the first one found is returned, making the environment work in a random space.
> This problem could be solved adding to ObjectMarshallingStrategy interface a getName() method in order to be able to avoid the usage of the getClass().getName() approach is being used now.
> Then PersisteHelper must use this method to store the ProtobufferHeader and then ObjectMarshallingStrategyStore must use the method to retrieve the appropiate implementation.
> In order to enable backward compatibility a NamedObjectMarshallingStrategyInterface could be added to be invoked only for updated implementors.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the jboss-jira mailing list