All,
I was just thinking about alternatives and producer methods. Suppose I have the following
bean:
@ApplicationScoped
public class Boop {
@Produces
@ApplicationScoped
public Simpler makeSimpler() {
return new Simpler("Boop");
}
}
If I want to override the producer method, I need to declare fully:
@Alternative
@Priority(100)
@ApplicationScoped
public class BoopAlternative extends Boop{
@Override
@Produces
public Simpler makeSimpler() {
return new Simpler("Boop2");
}
}
For some reason, scopes are inherited, but the produces annotation is not. At least in
the case of a producer method, it seems like it would be useful for @Produces to be
inherited as well.
John
________________________________
NOTICE: This e-mail message and any attachments may contain confidential, proprietary,
and/or privileged information which should be treated accordingly. If you are not the
intended recipient, please notify the sender immediately by return e-mail, delete this
message, and destroy all physical and electronic copies. Thank you.