[rules-dev] ObjectMarshallingStrategy not being used?

Laird Nelson ljnelson at gmail.com
Wed Apr 20 12:49:47 EDT 2011


(I hemmed and hawed about whether this goes on the dev or user list; I will
start with dev.)

I have a StatefulKnowledgeSession that I am trying to serialize using a
custom ObjectMarshallingStrategy.

However, it appears that the default full serialization strategy is being
used instead.

Here is the code that I am using:

final Marshaller marshaller = MarshallerFactory.newMarshaller(knowledgeBase,
new ObjectMarshallingStrategy[] { myStrategy });
assert marshaller != null;
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
final DroolsObjectOutputStream doos = new DroolsObjectOutputStream(oos);
marshaller.marshall(doos, this.droolsSession);
this.data = baos.toByteArray();

My strategy contains System.out.printlns at the moment in the write() and
read() methods.  They are never invoked.

What am I missing, or is this a bug?

Best,
Laird
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110420/2869512e/attachment.html 


More information about the rules-dev mailing list