2 Replies Latest reply on Jan 31, 2013 6:21 AM by jasonnh

    why do blueprint beans not allow request scope?

    jasonnh

      Hi,

       

      Does anybody know why blueprint beans do not allow the 'request' scope.

       

      Thanks.

        • 1. Re: why do blueprint beans not allow request scope?
          davsclaus

          The bean has scopes for singleton and prototype according to the XSD

          <xsd:simpleType name="Tscope">
                    <xsd:union>
                         <xsd:simpleType>
                              <xsd:restriction base="xsd:NMTOKEN">
                                   <xsd:enumeration value="singleton"></xsd:enumeration>
                                   <xsd:enumeration value="prototype"></xsd:enumeration>
                              </xsd:restriction>
                         </xsd:simpleType>
                         <xsd:simpleType>
                              <xsd:restriction base="xsd:QName">
                                   <xsd:pattern value=".+:.+"></xsd:pattern>
                              </xsd:restriction>
                         </xsd:simpleType>
                    </xsd:union>
               </xsd:simpleType>
          

           

          • 2. Re: why do blueprint beans not allow request scope?
            jasonnh

            Yes but unfortunately 'prototype' is not what I need.

             

            I want one instance to be created per request not every time it is accessed (which is what seems to happen with prototype).

             

            Thinking about it some more I guess one problem is what the request relates to.  For Spring I think this applies to HTTP requests but in my case I want it to be an arbitrary from of a camel route.  So maybe I would need a new request concept in blueprint and for camel to interpret it in it's own way.