[rules-users] stateless session getQueryResults

Mark Proctor mproctor at codehaus.org
Sat Sep 8 21:19:05 EDT 2007


Mark Proctor wrote:
> Is anyone using StatelessSession.getQueryResults(). Realised that it 
> was a mistake adding that. the idea of StatelessSessionResult is you 
> have something that is potentially serialisable. To execute that 
> method then you have to have a refernce to the entire WorkingMemory 
> and that must reference the RuleBase, so it suddenly makes that a 
> little heavy. I'm thinking of removing that method and also combining 
> it with the ability to specify only which inserted objects and set 
> globals are exported as part of a StatelessSessionResult, if not 
> specified all inserted objects will be made available and no globals.
>
> I'm not sure that querries make any sense on a stateless session 
> anyway, only stateful.
>
> This is an API change (removing getQueryResult), and if people are 
> using it I will leave as is, but I'm not sure if anyone will be using 
> that anyway. What do people think?
>
> Mark
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
Actually there may be a compromise. getQueryResults() can be left, but 
only works if you don't serialise, once we seriaise that method becomes 
Disabled as the ruleBase and WorkingMemory are lost. I think that will 
work and allow me to achieve the best of both worlds, without breaking 
the API.



More information about the rules-users mailing list