Transaction Scope for CDI
by Reza Rahman
CDI enthusiasts,
Pete, I and Nigel (JMS 2 spec lead) have been discussing the issue of the
transaction scope behind the scenes the past few weeks. Attached is what we
came up with and feel it meets the various related use-cases the most
effectively. The downside is that it is quite involved (conceptually) and
might take a bit of patience to absorb. Please give it a read and let me
know your thoughts.
Cheers,
Reza
10 years, 9 months
[JBoss JIRA] Created: (CDI-121) TransactionScope
by Richard Hightower (JIRA)
TransactionScope
----------------
Key: CDI-121
URL: https://issues.jboss.org/browse/CDI-121
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Contexts
Affects Versions: 1.1 (Proposed)
Environment: Java EE
Reporter: Richard Hightower
Priority: Minor
Add TransctionalScope as a standard scope to define beans whose lifecycle is the same as a given transaction.
This scope should start automatically when a transaction starts (but lazily when actually needed).
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 9 months
[JBoss JIRA] (CDI-232) Relax requirements for built-in Instance
by Martin Kouba (JIRA)
Martin Kouba created CDI-232:
--------------------------------
Summary: Relax requirements for built-in Instance
Key: CDI-232
URL: https://issues.jboss.org/browse/CDI-232
Project: CDI Specification Issues
Issue Type: Clarification
Affects Versions: 1.1.EDR1
Reporter: Martin Kouba
5.6.2. The built-in Instance
{quote}
The container must provide a built-in bean with:
* Instance<X> and Provider<X> for every legal bean type X in its set of bean types,
* every qualifier type in its set of qualifier types,
{quote}
This type/qualifier requirements seem to be too strict. Maybe we should omit these and instead force implementation to satisfy every injection point for every legal bean type and corresponding qualifiers found in application... or something like that. I'm not sure about the wording.
By the way Weld (2.0.0.Alpha2) does not fulfil these requirements at the moment.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-189) Event qualifiers - empty set
by Jozef Hartinger (Created) (JIRA)
Event qualifiers - empty set
----------------------------
Key: CDI-189
URL: https://issues.jboss.org/browse/CDI-189
Project: CDI Specification Issues
Issue Type: Bug
Components: Events
Affects Versions: 1.1.EDR1, 1.0
Reporter: Jozef Hartinger
Priority: Minor
Fix For: 1.1.EDR2
The spec says:
{quote}
An event comprises:
* A Java object—the event object
* A (*possibly empty*) set of instances of qualifier types—the event qualifiers
{quote}
while at the same it says that:
{quote}
*Every* event has the qualifier @javax.enterprise.inject.Any, even if it does not explicitly declare this qualifier.
{quote}
which impliest that a set of qualifiers of an event cannot be empty.
--
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
10 years, 9 months
[JBoss JIRA] (CDI-192) Unify coding style of the SPI interfaces
by Jozef Hartinger (Created) (JIRA)
Unify coding style of the SPI interfaces
----------------------------------------
Key: CDI-192
URL: https://issues.jboss.org/browse/CDI-192
Project: CDI Specification Issues
Issue Type: Bug
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Priority: Trivial
Fix For: 1.1 (Proposed)
The [JLS|http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html...] says:
{quote}
For compatibility with older versions of the Java platform, it is permitted but discouraged, as a matter of style, to redundantly specify the abstract modifier for methods declared in interfaces.
It is permitted, but strongly discouraged as a matter of style, to redundantly specify the public modifier for interface methods.
{quote}
The vast majority of CDI API interfaces specifies the public modifier while leaving out the abstract modifier, however, there are exceptions:
{code:JAVA}
public interface Context {
...
boolean isActive();
}
{code}
{code:JAVA}
public interface BeanAttributes<T> {
public abstract Set<Type> getTypes();
public abstract Set<Annotation> getQualifiers();
...
{code}
--
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
10 years, 9 months
[JBoss JIRA] (CDI-209) BeanManager.createProducer missing in the API
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-209:
-----------------------------------
Summary: BeanManager.createProducer missing in the API
Key: CDI-209
URL: https://issues.jboss.org/browse/CDI-209
Project: CDI Specification Issues
Issue Type: Bug
Components: Portable Extensions
Affects Versions: 1.1.EDR1
Reporter: Jozef Hartinger
Fix For: 1.1 (Proposed)
The spec says:
{quote}
The method BeanManager.createProducer() returns a container provided implementation of Producer for a given AnnotatedMethod or AnnotatedField or throws an IllegalArgumentException if there is a definition error associated with the producer method or field.
{quote}
However, the createProducer() method is not defined in the API.
--
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
10 years, 9 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
10 years, 10 months