[jboss-jira] [JBoss JIRA] (DROOLS-424) drools-camel support for session-scoped knowledge session

Damon Horrell (JIRA) issues at jboss.org
Sun Feb 9 02:37:28 EST 2014


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

Damon Horrell commented on DROOLS-424:
--------------------------------------

The configuration part of this would be easy. e.g. in the xsd:

<xsd:attribute name="type" use="required" type="knowledgeSessionTypeEnum"/>

could be replaced with:

  <xsd:attribute name="type" use="optional" type="knowledgeSessionTypeEnum"/>
  <xsd:attribute name="scope" use="optional" type="knowledgeSessionScopeEnum"/>

  <xsd:simpleType name="knowledgeSessionScopeEnum">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="request" />
      <xsd:enumeration value="session" />
      <xsd:enumeration value="application" />
    </xsd:restriction>
  </xsd:simpleType>

and then in KnowledgeSessionDefinitionParser, scope="request" would be equivalent to type="stateless", and scope="application" would 
be equivalent to type="stateful".  The new option would be scope="session".

However I'm not sure when the StatefulKnowledgeSession would actually be created as it requires access to the HTTP session to store it for future requests.  Does the HTTP request get passed all the way through from Camel to the Drools classes?  I tried tracing it through but lost it somewhere in the depths of Camel.
                
> drools-camel support for session-scoped knowledge session
> ---------------------------------------------------------
>
>                 Key: DROOLS-424
>                 URL: https://issues.jboss.org/browse/DROOLS-424
>             Project: Drools
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.6.0.Final
>            Reporter: Damon Horrell
>            Assignee: Mark Proctor
>
> The Spring configuration for drools-camel allows creation of either a stateless knowledge session (i.e. effectively request-scoped), or a single stateful knowledge session which is shared by all requests (i.e. effectively application-scoped).   There is no session-scoped option.
> This differs from the earlier drools-execution-server module which was replaced by drools-camel.  drools-execution-server maintained a separate StatefulKnowledgeSession instance per HTTP session.
> Can you please add support for a session-scoped StatefulKnowledgeSession?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list