Weekly meeting
by Pete Muir
All
We need to get a weekly meeting setup to run over issues. At the end of each meeting we'll sort out what issues we will look at for the next meeting.
People who want to attend, please respond with:
* the timezone you are normally in
* what times and days you can do (either in your local time, or UTC)
I'm expecting these people to reply :-)
* Mark Struberg
* Martin Kouba
* Jozef Hartinger
* Mike Brock
But everyone is welcome!
pete
12 years, 4 months
[JBoss JIRA] (CDI-248) Provide means to observe a group of qualified events ("Qualifier Inheritance"?)
by Jens Schumann (JIRA)
Jens Schumann created CDI-248:
---------------------------------
Summary: Provide means to observe a group of qualified events ("Qualifier Inheritance"?)
Key: CDI-248
URL: https://issues.jboss.org/browse/CDI-248
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Concepts, Events
Reporter: Jens Schumann
We have been using CDI events for application development quite extensively. For instance we use events to propagate entity lifecycle events (@Created/@Updated/@Deleted Customer customer) or GUI selections (@Selected/@Deselected Customer customer) and implement related business logic in event observers. (e.g. send email for newly created customers, clear cached values on select/deselect/create/update/delete ...).
This works quite well, however we have noticed that especially our JSF Presentation Tier contains lots of observer methods implementing the same behavior for a group of related CDI events.
Example:
{code}
public class XyzBean {
public void onCustomerCreate(@Observes @Created Customer customer) { reset();}
public void onCustomerUpdate(@Observes @Updated Customer customer) { reset();}
public void onCustomerDelete(@Observes @Deleted Customer customer) { reset();}
}
{code}
Looks ugly, doesn't it?
The above example could be improved if CDI would be able to observe a group of qualified events, e.g. public void onCustomerLifeCycleEvent(@Observes @LifeCycleChange Customer customer) { reset(); } - ignore method and qualifier names for now.
Since Java does not support annotation inheritance grouping could be achieved using "qualified qualifier annotations":
{code}
@Qualifier
public @interface LifeCycleChange
@Qualifier
@LifeCycleChange
public @interface Created
@Qualifier
@LifeCycleChange
public @interface Updated
@Qualifier
@LifeCycleChange
public @interface Deleted
@Qualifier
public @interface SelectionChange
@Qualifier
@SelectionChange
public @interface Selected
@Qualifier
@SelectionChange
public @interface Deselected
{code}
WDYT? Side effects? Problems?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-237) missing beans.xml
by Craig Ringer (JIRA)
Craig Ringer created CDI-237:
--------------------------------
Summary: missing beans.xml
Key: CDI-237
URL: https://issues.jboss.org/browse/CDI-237
Project: CDI Specification Issues
Issue Type: Feature Request
Environment: N/A, any Java EE 6
Reporter: Craig Ringer
Priority: Minor
It's common, especially for new users of Java EE and CDI, for confusion to arise because of a missing or misplaced beans.xml file. Injection sites that should be injected are null, interceptors don't run, etc. People experienced with CDI immediately spot what's wrong, but if you haven't worked with EE much it can throw you quite badly.
It's particularly problematic when beans.xml exists, but isn't where the server expects it to be. This can happen when a jar-layout archive is deployed as a .war or vice versa (something newbies can and will do), or when beans.xml is placed in META-INF/ for a war archive where it's supposed to be in WEB-INF/ .
It would be very helpful if it were possible to efficiently detect an archive that uses javax.inject.* annotations without a beans.xml file and issue a warning. To enhance the usability of CDI and its accessibility to new developers, IMO the spec should encourage this.
A deployment error when javax.inject.Inject etc are used without a beans.xml file isn't appropriate, as there may be non-CDI code using those annotations, but a warning would make a big difference to usability.
It's possible this is better done in an application-server specific context rather than as anything to do with the CDI specification, since the AS is scanning the archive during deployment anyway. If that's the case, it's probably best to move this issue to the JBoss AS 7 JIRA.
If it's possible for a CDI impl to *efficiently* detect javax.inject.* and warn, though, it'd be a good thing to encourage in the spec.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months
[JBoss JIRA] (CDI-241) Support dependency injection within Bean Validation constraint validators
by Gunnar Morling (JIRA)
Gunnar Morling created CDI-241:
----------------------------------
Summary: Support dependency injection within Bean Validation constraint validators
Key: CDI-241
URL: https://issues.jboss.org/browse/CDI-241
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Java EE integration
Reporter: Gunnar Morling
CDI should integrate with Bean Validation to support dependency injection within BV {{ConstraintValidator}} implementations.
>From the BV 1.1 [spec early draft|http://beanvalidation.org/1.1/spec/#bootstrapping-usageandcontainer...]:
{quote}
Java EE should obey the rules defined above and enable Context and Dependency Injection (CDI) support to {{ValidatorFactory}} instances. In particular:
* Let {{Validator}} and {{ValidatorFactory}} object be injectable.
* Use a default {{ConstraintValidatorFactory}} implementation that returns CDI managed {{ConstraintValidator}} objects. The scope of these instances is dependent as the Bean Validation provider is responsible for them.
* Provide CDI managed instances of {{ConstraintValidatorFactory}}, {{MessageInterpolator}} and {{TraversableResovler}} if customized classes are requested in the XML deployment descriptor.
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months