[
https://issues.apache.org/jira/browse/OWB-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15150987#comment-15150987
]
Shahim Essaid commented on OWB-1119:
------------------------------------
Hi [~struberg],
Should I continue this discussion on the list/irc instead of this issue?
I still need to look a little deeper at the OWB implementation for
Conversation. I'm still new to OWB and CDI implementations in general. I don't
like the builtin scopes that much either but I do want to provide an
implementation of the builtin scopes so that existing code can still run with
my API. However, I'll do this a an optional jar that can be used when needed.
I'm trying to implement scopes in the container rather than as CDI Extensions.
I'll have some examples to show soon but I was hoping that the first example
would be an implementation of the builtin scopes and this is why I'm trying to
figure out how to do it with OWB.
A more specific question is this. With the current OWB implementation, and a
custom ContextsService, can I implement the following use case?
1. There is existing code (i.e. beans) that injects
javax.enterprise.context.Conversation and I want to reuse these beans without
changing them.
2. I want to run these beans in OWB with my API with whatever OWB API
customization that is available currently (i.e. without having model the
ConversationManager as an OWB service).
3. My API allows the calling client to indicate that conversations can be
multi-threaded.
4. My API allows the calling client to indicate if the thread has read or write
access to contexts. This is enforced in my API as a threads enter and exit
Context locks in my context implementations.
Can this be done? Any tips for now to do this without needing major rework?
>From what I know so far about OWB, this will not be possible without fully
>overriding how ConversationScoped is implemented. I'll have to see how to
>plugin my own implementation of this scope and have it override what is
>already implemented in OWB. As I mentioned above, I'm still new to the OWB
>implementation so I might be missing the obvious way for doing this :-)
Thank you all for the very quick replies!
> Implement ConversationManagerService to plugin a custom manager
> ---------------------------------------------------------------
>
> Key: OWB-1119
> URL: https://issues.apache.org/jira/browse/OWB-1119
> Project: OpenWebBeans
> Issue Type: Improvement
> Components: Context and Scopes
> Affects Versions: 1.6.2
> Reporter: Shahim Essaid
>
> I'm working on a framework for using OpenWebBeans and it would be very
> helpful to be able to plugin my custom ConversationManager. Currently the
> manager is simply instantiated in WebBeansContext like this:
> conversationManager = new ConversationManager(this);
> Please implement the same logic for loading the ConversationManager as a
> service. I also didn't find an API way for overriding the instantiated
> ConversationManager with a new one after the WebBeansContext is instantiated.
> The initial services constructor parameter doesn't help with this either. I'm
> still new to the OpenWebBeans implementation and I don't think I know enough
> to be able to submit a patch to implement this.
> Did I miss how I can plugin my own manager with the current implementation?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)