|Re: [ee4j-community] Tomitribe commitment to EE4J|
I would avoid introducing new annotations unless absolutely necessary. From usability perspective, developers don’t care about package names, they just want things to work. So it’s important to make the annotations, which now work only in EJBs, work also in any CDI bean. The exact same annotations, even if inside package with ejb in it's name.
It's a good idea to deprecated EJB-specific annotations like @Stateless or @Stateful once there’s an alternative. But I wouldn't introduce new annotations for timers – deprecation doesn’t remove old annotations and IDEs will keep suggesting them in imports, which is very confusing already for annotations like Singleton, ManagedBean, etc as mentioned by David earlier.
On Sat, Oct 14, 2017 at 10:44 PM, David Blevins <dblevins@xxxxxxxxxxxxx> wrote:
I hear you, and this has been a concern indeed. There are more examples like the @RequestScoped etc annotations in CDI and JSF. With the above I didn't mean though to necessarily use the same names, but at least the semantically equivalent service that these annotations stand for.
Probably we should not introduce annotations with the same name before deprecating the similarly named old one. At least I've added the deprecated annotation to the JSF ones for JSF 2.3, so the IDE should warn about them.
True, but as mentioned deprecation of the older ones should help with that in cases where they actually are similar things. JAX-RS' @Produces is something totally different from CDI's one, so that's quite an unfortunate situation.
People should not want to import JSF's @ManagedBean ;) It's very much deprecated :P
Totally pruning EJB would probably be the solution for that particular problem.
Back to the top