[JBoss JIRA] Created: (CDI-138) Allow an extension to register an interceptor bindings with an AnnotatedType
by Kevin Pollet (JIRA)
Allow an extension to register an interceptor bindings with an AnnotatedType
----------------------------------------------------------------------------
Key: CDI-138
URL: https://issues.jboss.org/browse/CDI-138
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Interceptors, Portable Extensions
Affects Versions: 1.0
Reporter: Kevin Pollet
Fix For: 1.1 (Proposed)
At BeforeBeanDiscovery phase an interceptor binding could be added with an {{AnnotatedType}} instead of annotation class. This could allow to add annotations to existing annotation attributes.
For example this case is needed for annotations {{@CacheResult}}, {{@CacheRemoveEntry}} and {{@CacheRemoveAll}} from JSR-107 which haven't annotation attributes annotated with {{@NonBinding}}.
The method signature could be:
* {{BeforeBeanDiscovery#addInterceptorBinding(AnnotatedType<?> annotatedType, Annotation... bindingTypeDef)}}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] (CDI-10) Add ability to access a bean instance from a proxy
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-10?page=com.atlassian.jira.plugin.sys... ]
Pete Muir commented on CDI-10:
------------------------------
However you can still make your custom injections into CDI @Inject injections using the PAT.
> Add ability to access a bean instance from a proxy
> --------------------------------------------------
>
> Key: CDI-10
> URL: https://issues.jboss.org/browse/CDI-10
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Beans
> Affects Versions: 1.0
> Reporter: Stuart Douglas
>
> There are occasions when it would be useful to access a bean instance directly from a proxy. This could be achieved by making all proxies assignable to an interface (say BeanProxy) that provides a getBeanInstance() method.
> Client code that needs access to the actual instance can check if the object is assignable to the BeanProxy interface and then call getBeanInstance() to get the actual instance if required.
> This is something that is probably more useful to extension writers than the end user, but there have already been a few requests on the weld forum about this so it is probably worth considering.
--
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
11 years, 7 months
[JBoss JIRA] (CDI-10) Add ability to access a bean instance from a proxy
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/CDI-10?page=com.atlassian.jira.plugin.sys... ]
Stuart Douglas commented on CDI-10:
-----------------------------------
One possible use for this is dependent scoped beans that are intercepted/decorated. If these are implemented via proxying then it will not be possible to implement any form of custom injection, as it is not possible to reflect on them directly.
> Add ability to access a bean instance from a proxy
> --------------------------------------------------
>
> Key: CDI-10
> URL: https://issues.jboss.org/browse/CDI-10
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Beans
> Affects Versions: 1.0
> Reporter: Stuart Douglas
>
> There are occasions when it would be useful to access a bean instance directly from a proxy. This could be achieved by making all proxies assignable to an interface (say BeanProxy) that provides a getBeanInstance() method.
> Client code that needs access to the actual instance can check if the object is assignable to the BeanProxy interface and then call getBeanInstance() to get the actual instance if required.
> This is something that is probably more useful to extension writers than the end user, but there have already been a few requests on the weld forum about this so it is probably worth considering.
--
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
11 years, 7 months
Subclassing?
by Romain Manni-Bucau
Hi,
There is a bunch of jira to specify subclassing should be used in some
cases so i mail here instead of answering all jira.
IMO it is specifying too much the technical part: specify the constructor
should be called twice is better for a spec IMHO (but this case is not
logical at all ;))
Why this need?
- Romain
11 years, 7 months
[JBoss JIRA] Created: (CDI-141) remove overly strict Serialization requirements for @Inject method and ct parameters
by Mark Struberg (JIRA)
remove overly strict Serialization requirements for @Inject method and ct parameters
------------------------------------------------------------------------------------
Key: CDI-141
URL: https://issues.jboss.org/browse/CDI-141
Project: CDI Specification Issues
Issue Type: Bug
Components: Beans, Resolution
Affects Versions: 1.0
Reporter: Mark Struberg
Fix For: 1.1 (Proposed)
Section 6.6.4 declares that:
> If a producer method declares a passivating scope and:
> ..
> * has a parameter that does not resolve to a passivation capable
> dependency,
> then the container automatically detects the problem and
> treats it as a deployment problem.
Something like
@Produces @SessionScoped @AutoAuthenticated
public User getCurrentUser(MyConfig mc) {
return ...
(MyConfig is not Serializable and gets produced as @ApplicationScoped) would not be allowed.
The same restriction currently applies to parameters of @Inject methods and constructors:
>If a managed bean which declares a passivating scope:
> has a ... , bean constructor parameter or initializer method parameter
> that does not resolve to a passivation capable dependency, ...
This maybe comes from simple @Inject setters which set the given method parameters 1:1 into class members. But for all other cases this restriction is just way too rigid.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months