[
https://issues.apache.org/jira/browse/OWB-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846856#action_12846856
]
Mark Struberg commented on OWB-329:
-----------------------------------
I think we talk about the same thing. A proxy is technically a generated
subclass.
But you can use this proxy in 2 different ways
1. for proxying, aka 'redirecting' all requests to a hidden inner instance
inside the methodhandler
2. for 'subclassing' by doing something inside the MethodHandler and invoking
the method on the own instance (this).
> Actually you must not call the destroy method of the beans directly. Destroy
> method is called by the Context instance that its instance live.
Yes, but we have no control at which time a 3rd party context destroys it's
contextual instances!
Please note that our internal contexts do not behave as defined by the spec
currently! The spec definition implicitly makes clear that there is only one
Context instance per scope (look at the SPI description, there is no way to add
'multiple' contexts for the same scope).
To give you an example: the ViewScopedContext internally catches the JSF
PreDestroyViewMapEvent to cleanup it's contextual instances. There is no way
that any Context wrapper can catch this! We could try to also handle this in
our Bean<T> wrappers, but imo this gets too complicated and also contradicts
the spec.
> Interceptor instances get created each time the interceptor gets called
> -----------------------------------------------------------------------
>
> Key: OWB-329
> URL: https://issues.apache.org/jira/browse/OWB-329
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: M4
> Reporter: Mark Struberg
> Assignee: Mark Struberg
> Priority: Critical
> Fix For: 1.0.0
>
>
> Interceptors are defined as being @Dependent scoped. Thus, for one
> @ApplicationScoped contextual instance, only one interceptor instance of a
> certain type must exist. But we currently create a new instance for each and
> every method invocation which is intercepted.
> This is not only terribly slow, but also doesn't work as expected from a
> portable perspective.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.