Binary compatibility and removing classes
by John D. Ament
Hi all
Was reading through the log from this past meeting. To comment on a couple
of points:
- In JMS 2.0 we really wanted to remove the old Queue and Topic based
interfaces. We received a lot of push back from even deprecating them, and
the most that could be done was to add a comment to the javadoc dissuading
people from using them and only keeping them around for legacy purposes.
Similar to how @New is stuck around, probably forever, any existing
classes need to stick around forever. When it comes to pruning, the
pruning is around a technology and not just a small set of classes within a
JSR.
- In JDK8, they fixed the binary compatibility issue w/ default methods.
Since CDI 2.0 should be targeting a Java 8 runtime, can we leverage that
for binary compatibility, by saying any new methods we add to interfaces
will be default methods some ambiguous/not very useful implementation?
John
10 years, 3 months
[JBoss JIRA] (CDI-482) Overloaded version of ObserverMethod.notify()
by Jozef Hartinger (JIRA)
Jozef Hartinger created CDI-482:
-----------------------------------
Summary: Overloaded version of ObserverMethod.notify()
Key: CDI-482
URL: https://issues.jboss.org/browse/CDI-482
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Events, Portable Extensions
Affects Versions: 1.2.Final
Reporter: Jozef Hartinger
Fix For: 2.0 (discussion)
Resurrecting the old proposal (CDI-36) that was rejected due to backward compatibility (CDI-281). In the meantime, alternative approach of obtaining event qualifiers (doing a programmatic lookup for EventMetadata) became available.
Now that default methods are available in Java, we should consider making EventMetadata easier to use by making it part of the SPI directly:
{code:JAVA}
ObserverMethod.notify(T event, EventMetadata metadata)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
Controlling the Interceptor chain
by Mohan Radhakrishnan
Hi,
I have read the older CDI and interceptor spec. but not very
thoroughly.
Does control over how methods are intercepted using the following rules
make it more useful ?
1. Intercept only the top-level call and not recursive calls.
2. Intercept and decorate "call 1" if it happens within "call 2" and not
"call 3". Specify one type of combination of interceptions but not the
other.
I hope these are not orthogonal to the spec. They are features of AOP I
know.
Thanks,
Mohan
10 years, 3 months
[JBoss JIRA] (CDI-255) Support for Implicit Producers
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/CDI-255?page=com.atlassian.jira.plugin.sy... ]
Antonio Goncalves edited comment on CDI-255 at 9/20/14 9:13 AM:
----------------------------------------------------------------
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
*CDI 1.2* (3.8. Additional built-in beans)
A Java EE or embeddable EJB container must provide the following built-in beans, all of which
have qualifier {{@Default}}:
* a bean with bean type {{javax.transaction.UserTransaction}}, allowing injection of a reference
to the JTA UserTransaction, and
* a bean with bean type {{javax.security.Principal}}, allowing injection of a Principal
representing the current caller identity.
A servlet container must provide the following built-in beans, all of which have qualifier @Default:
* a bean with bean type {{javax.servlet.http.HttpServletRequest}}, allowing injection of a
reference to the {{HttpServletRequest}}
* a bean with bean type {{javax.servlet.http.HttpSession}}, allowing injection of a reference
to the {{HttpSession}},
* a bean with bean type {{javax.servlet.ServletContext}}, allowing injection of a reference to
the {{ServletContext}},
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
Other Java EE objects that could be implicitly produced :
{code}
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em; // From JPA, handy when there is only one persistence unit
{code}
was (Author: agoncal):
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
*CDI 1.2* (3.8. Additional built-in beans)
A Java EE or embeddable EJB container must provide the following built-in beans, all of which
have qualifier {{@Default}}:
• a bean with bean type {{javax.transaction.UserTransaction}}, allowing injection of a reference
to the JTA UserTransaction, and
• a bean with bean type {{javax.security.Principal}}, allowing injection of a Principal
representing the current caller identity.
A servlet container must provide the following built-in beans, all of which have qualifier @Default:
• a bean with bean type {{javax.servlet.http.HttpServletRequest}}, allowing injection of a
reference to the {{HttpServletRequest}}
• a bean with bean type {{javax.servlet.http.HttpSession}}, allowing injection of a reference
to the {{HttpSession}},
• a bean with bean type {{javax.servlet.ServletContext}}, allowing injection of a reference to
the {{ServletContext}},
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
Other Java EE objects that could be implicitly produced :
{code}
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em; // From JPA, handy when there is only one persistence unit
{code}
> Support for Implicit Producers
> ------------------------------
>
> Key: CDI-255
> URL: https://issues.jboss.org/browse/CDI-255
> Project: CDI Specification Issues
> Issue Type: Tracker
> Affects Versions: 1.0
> Reporter: Pete Muir
>
> An implicit producer could be registered for every unambiguous resource the Java EE container knows about.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-255) Support for Implicit Producers
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/CDI-255?page=com.atlassian.jira.plugin.sy... ]
Antonio Goncalves edited comment on CDI-255 at 9/20/14 9:13 AM:
----------------------------------------------------------------
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
*CDI 1.2* (3.8. Additional built-in beans)
A Java EE or embeddable EJB container must provide the following built-in beans, all of which
have qualifier {{@Default}}:
• a bean with bean type {{javax.transaction.UserTransaction}}, allowing injection of a reference
to the JTA UserTransaction, and
• a bean with bean type {{javax.security.Principal}}, allowing injection of a Principal
representing the current caller identity.
A servlet container must provide the following built-in beans, all of which have qualifier @Default:
• a bean with bean type {{javax.servlet.http.HttpServletRequest}}, allowing injection of a
reference to the {{HttpServletRequest}}
• a bean with bean type {{javax.servlet.http.HttpSession}}, allowing injection of a reference
to the {{HttpSession}},
• a bean with bean type {{javax.servlet.ServletContext}}, allowing injection of a reference to
the {{ServletContext}},
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
Other Java EE objects that could be implicitly produced :
{code}
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em; // From JPA, handy when there is only one persistence unit
{code}
was (Author: agoncal):
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
So definitely a section on Java EE about implicit producers
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
Other Java EE objects that could be implicitelly produced :
{code}
@Inject Principal currentUser; // From JAAS
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em; // From JPA, handy when there is only one persistence unit
{code}
> Support for Implicit Producers
> ------------------------------
>
> Key: CDI-255
> URL: https://issues.jboss.org/browse/CDI-255
> Project: CDI Specification Issues
> Issue Type: Tracker
> Affects Versions: 1.0
> Reporter: Pete Muir
>
> An implicit producer could be registered for every unambiguous resource the Java EE container knows about.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (CDI-255) Support for Implicit Producers
by Antonio Goncalves (JIRA)
[ https://issues.jboss.org/browse/CDI-255?page=com.atlassian.jira.plugin.sy... ]
Antonio Goncalves edited comment on CDI-255 at 9/20/14 8:38 AM:
----------------------------------------------------------------
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
So definitely a section on Java EE about implicit producers
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
Other Java EE objects that could be implicitelly produced :
{code}
@Inject Principal currentUser; // From JAAS
@Inject FacesContext facesContext; // From JSF
@Inject EntityManager em; // From JPA, handy when there is only one persistence unit
{code}
was (Author: agoncal):
When you look at all the Java EE 7 specs, you don't find much :
*Bean Validation 1.1* (§ 10.3. Context and Dependency Injection (CDI) integration)
{code}
@Inject ValidatorFactory;
@Inject Validator;
{code}
*JMS 2.0* (§ 12.4.3. Injection syntax)
{code}
@Inject
private JMSContext context;
{code}
So definitely a section on Java EE about implicit producers
BTW, in the Java EE 7 spec there is *only one single* line of code showing {{@Inject}}
> Support for Implicit Producers
> ------------------------------
>
> Key: CDI-255
> URL: https://issues.jboss.org/browse/CDI-255
> Project: CDI Specification Issues
> Issue Type: Tracker
> Affects Versions: 1.0
> Reporter: Pete Muir
>
> An implicit producer could be registered for every unambiguous resource the Java EE container knows about.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months