Details

    • Type: Feature Request
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: 2.0 (discussion)
    • Component/s: Contexts
    • Labels:
      None

      Description

      Add management API for built in contexts allowing them to be reused as needed.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            pmuir Pete Muir added a comment -

            Ok, we will cover scope at the phone call next week and come up with a statement.

            Show
            pmuir Pete Muir added a comment - Ok, we will cover scope at the phone call next week and come up with a statement.
            Hide
            shane.bryzak Shane Bryzak added a comment -

            There is no @ConversationScoped annotation in Seam 3 that I'm aware of. We need the management API to be able to support conversation management within view technologies other than JSF. Currently, we need to use a non-portable solution to achieve this, however it should have really been part of the CDI 1.0 specification and in my opinion it was an oversight that it was not included.

            Show
            shane.bryzak Shane Bryzak added a comment - There is no @ConversationScoped annotation in Seam 3 that I'm aware of. We need the management API to be able to support conversation management within view technologies other than JSF. Currently, we need to use a non-portable solution to achieve this, however it should have really been part of the CDI 1.0 specification and in my opinion it was an oversight that it was not included.
            Hide
            pmuir Pete Muir added a comment -

            Slipping Java SE related issues.

            Show
            pmuir Pete Muir added a comment - Slipping Java SE related issues.
            Hide
            atijms arjan tijms added a comment -

            John Ament
            First PR looks good!

            Would it be an idea to set a wrapped (or decorated) context controller?

            What I'm looking for is a way to start contexts possibly earlier than a specific container implementation normally starts them, and stop them possibly later. If the context is started earlier in say a request, then eventually the container will also start that same context later in the request. If that will throw an exception the request will not proceed, which is of course not intended.

            Likewise, when the container stops the context this will thus be too early.

            With a wrapped context controller, the startContexts and stopContexts calls can be ignored for those contexts the application (extension/library) wanted to start earlier and stop later. This does of course assume that the container itself will also use this context controller instead of the current proprietary code.

            Additionally, the PR does not contain the check anymore to see if the context is already active or already stopped. Is that still intended to be added? This would be particularly useful for code that needs to be portable between different containers, where one container may already have started the context at a given point, where another container has not (catching the exception would be an alternative here but is obviously not so nice).

            Another point, what about letting the caller of the startContexts method optionally pass in the objects (or a lambda to obtain them) on which that context primarily depends (if any). E.g. for the request scope, pass in an HttpServletRequest instance.

            Show
            atijms arjan tijms added a comment - John Ament First PR looks good! Would it be an idea to set a wrapped (or decorated) context controller? What I'm looking for is a way to start contexts possibly earlier than a specific container implementation normally starts them, and stop them possibly later. If the context is started earlier in say a request, then eventually the container will also start that same context later in the request. If that will throw an exception the request will not proceed, which is of course not intended. Likewise, when the container stops the context this will thus be too early. With a wrapped context controller, the startContexts and stopContexts calls can be ignored for those contexts the application (extension/library) wanted to start earlier and stop later. This does of course assume that the container itself will also use this context controller instead of the current proprietary code. Additionally, the PR does not contain the check anymore to see if the context is already active or already stopped. Is that still intended to be added? This would be particularly useful for code that needs to be portable between different containers, where one container may already have started the context at a given point, where another container has not (catching the exception would be an alternative here but is obviously not so nice). Another point, what about letting the caller of the startContexts method optionally pass in the objects (or a lambda to obtain them) on which that context primarily depends (if any). E.g. for the request scope, pass in an HttpServletRequest instance.
            Hide
            meetoblivion John Ament added a comment -

            HI Arjan,

            I always find it easier to discuss on ML's but will try to answer you here.

            I think what you're asking for is to intercept at the container level and change how they initialize. I'm curious, under what cases do you not have an active request?

            In addition, I think you're looking for the equivalent of Context.isActive. Part of me even wonders if swapping around the impl to be Context.activate() and Context.deactivate() may be better from a domain standpoint.

            Show
            meetoblivion John Ament added a comment - HI Arjan, I always find it easier to discuss on ML's but will try to answer you here. I think what you're asking for is to intercept at the container level and change how they initialize. I'm curious, under what cases do you not have an active request? In addition, I think you're looking for the equivalent of Context.isActive . Part of me even wonders if swapping around the impl to be Context.activate() and Context.deactivate() may be better from a domain standpoint.

              People

              • Assignee:
                meetoblivion John Ament
                Reporter:
                nickarls Nicklas Karlsson
              • Votes:
                2 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Development