[JBoss JIRA] (CDI-546) Constant for default observer priority
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-546?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-546:
-------------------------------------
Fix Version/s: 2.0 .Final
(was: 2.0 (discussion))
> Constant for default observer priority
> --------------------------------------
>
> Key: CDI-546
> URL: https://issues.jboss.org/browse/CDI-546
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Jozef Hartinger
> Priority: Minor
> Fix For: 2.0 .Final
>
>
> Currently we use:
> {code:JAVA}
> @Override
> public default int getPriority() {
> return javax.interceptor.Interceptor.Priority.APPLICATION + 500;
> };
> {code}
> It would be nice to have the value stored as a constant e.g.:
> {code:JAVA}
> int DEFAULT_PRIORITY=javax.interceptor.Interceptor.Priority.APPLICATION + 500;
> {code}
> so that other code can reference it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months
[JBoss JIRA] (CDI-561) Add the possibility to unmanage a bean instance
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-561?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-561:
-------------------------------------
Fix Version/s: TBD
(was: 2.0 (discussion))
> Add the possibility to unmanage a bean instance
> -----------------------------------------------
>
> Key: CDI-561
> URL: https://issues.jboss.org/browse/CDI-561
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Beans
> Affects Versions: 1.2.Final, 1.1.Final, 2.0-EDR1
> Reporter: Antoine Sabot-Durand
> Fix For: TBD
>
>
> CDI implementations make heavy uses of proxies to support normal scope and interceptor decorators. There are use case where being able to have a bean instance without its proxy could be useful
> * Accessing the true class of the instance in a clean way
> * Being able to capture an instance state to use its information outside CDI or as an event payload
> The limitation we have on Async event is probably a good example. As we don't propagate active normal context at firing time, it's not possible to inject a bean with such a scope (except {{@ApplicationScoped}} since Application context is shared), it could be useful to give the possibility to copy such a bean instance to a standard pojo instance so it could be used as event payload for instance.
> We could even imagine that the mechanism could be transparently activated if an asynchronous observer inject a {{@RequestScoped}} or {{@SessionScoped}} bean.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months
[JBoss JIRA] (CDI-592) Consider adding ObserverMethod.notify() method which also accepts EventMetadata
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-592?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-592:
-------------------------------------
Fix Version/s: 2.0 .Final
(was: 2.0 (discussion))
> Consider adding ObserverMethod.notify() method which also accepts EventMetadata
> -------------------------------------------------------------------------------
>
> Key: CDI-592
> URL: https://issues.jboss.org/browse/CDI-592
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Events
> Reporter: Martin Kouba
> Fix For: 2.0 .Final
>
>
> {code:java}
> // Make the original method also default so that new impls don't need to implement two methods
> default void notify(T event) {
> // No-op
> }
> // The container should always call this method...
> default void notify(T event, EventMetadata metadata) {
> notify(event);
> }
> {code}
> This should not break existing implementations. The truth is a custom impl will not be forced to implement any {{notify()}} method. But I think the benefits are worth it.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months
[JBoss JIRA] (CDI-601) Add container lifecycle event fired before container destroys all contexts
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-601?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand resolved CDI-601.
--------------------------------------
Resolution: Duplicate Issue
Duplicates CDI-625
> Add container lifecycle event fired before container destroys all contexts
> --------------------------------------------------------------------------
>
> Key: CDI-601
> URL: https://issues.jboss.org/browse/CDI-601
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Martin Kouba
> Fix For: 2.0 (discussion)
>
>
> The name might be something like {{BeforeContainerShutdown}}. Note that we probably cannot change the name or semantics of {{BeforeShutdown}}, which is fired after container destroys all contexts. The motivation is to allow the beans to perform some kind of cleanup before dependencies could be disposed (the ordering of destruction is not defined).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months
[JBoss JIRA] (CDI-613) Container should be able to receive information about the context in which it was bootstraped
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-613?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-613:
-------------------------------------
Fix Version/s: 2.0 (discussion)
(was: 2.0 .Final)
> Container should be able to receive information about the context in which it was bootstraped
> ---------------------------------------------------------------------------------------------
>
> Key: CDI-613
> URL: https://issues.jboss.org/browse/CDI-613
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Java EE integration
> Reporter: Antoine Sabot-Durand
> Fix For: 2.0 (discussion)
>
>
> Today it's impossible to know what is the outside context of the CDI container (i.e what is the application or EE module it belongs to).
> This is problematic for other spec like JPA who needs to retrieve their information (persistence units) from a portable extension.
> This would help solving issues like WFLY-2387 in a portable way.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months
[JBoss JIRA] (CDI-526) Include filters
by Antoine Sabot-Durand (JIRA)
[ https://issues.jboss.org/browse/CDI-526?page=com.atlassian.jira.plugin.sy... ]
Antoine Sabot-Durand updated CDI-526:
-------------------------------------
Fix Version/s: 2.0 (discussion)
(was: 2.0 .Final)
> Include filters
> ---------------
>
> Key: CDI-526
> URL: https://issues.jboss.org/browse/CDI-526
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Components: Packaging and Deployment
> Affects Versions: 1.2.Final
> Reporter: Jozef Hartinger
> Fix For: 2.0 (discussion)
>
>
> CDI has support for exclude filters in the beans.xml where a certain part of a bean archive (no matter whether "annotated" or "all" type) can be excluded from CDI processing on a package level, e.g:
> {code:XML}
> <exclude name="com.acme.rest.*" />
> {code}
> With the rise of fat jars and CDI support for SE it would also be useful to be able to define an include filter. Suppose we have a single large jar file with all its dependencies shaded in. This jar file has the beans.xml file which means that all the packages in that file are processed (all classes are at least scanned for bean defining annotations or even turned into CDI beans in "all" mode). We can obviously add a couple of exclude filters for each of the libraries we do not want to scan. It would however be much nicer if we could define a single include filter e.g.:
> {code:XML}
> <include name="my.application.*" />
> {code}
> Other packages (that belong to shaded-in libraries) in the same jar would not be scanned at all.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
7 years, 6 months