[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2976) DefaultMarshaller does not use supplied ObjectMarshallingStrategies
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Mon May 16 01:13:01 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-2976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor resolved JBRULES-2976.
-----------------------------------
Fix Version/s: 5.2.0.CR1
Resolution: Done
Edson applied the original patch, but it needed more than this.
-this.strategyStore was missing from unmarshall, to make it reflect the patch.
-MarshallerProviderImpl.newMarshaller should not default to serialized strategy, but instead pass a null strategy. Allowing it to fallback to what's provided in the ksession/enviornment
> DefaultMarshaller does not use supplied ObjectMarshallingStrategies
> -------------------------------------------------------------------
>
> Key: JBRULES-2976
> URL: https://issues.jboss.org/browse/JBRULES-2976
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core (expert)
> Affects Versions: 5.2.0.M1, 5.2.0.M2, 5.2.0.CR1
> Reporter: Laird Nelson
> Assignee: Mark Proctor
> Fix For: 5.2.0.CR1
>
>
> DefaultMarshaller.java does not use the supplied ObjectMarshallingStrategy as far as I can tell.
> When you create a Marshaller like this:
> {code}
> final Marshaller marshaller = MarshallerFactory.newMarshaller(knowledgeBase, new ObjectMarshallingStrategy[] { myStrategy });
> assert marshaller != null;
> {code}
> And then use it like this (or similar):
> {code}
> final ByteArrayOutputStream baos = new ByteArrayOutputStream();
> final ObjectOutputStream oos = new ObjectOutputStream(baos);
> final DroolsObjectOutputStream doos = new DroolsObjectOutputStream(oos);
> marshaller.marshall(doos, this.droolsSession);
> {code}
> ...the supplied strategy's read() and write() methods are never called.
> This is because DefaultMarshaller.java line 132 does not use the DefaultMarshaller's strategy, but the strategy of the incoming StatefulKnowledgeSession instead.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list