Can an observer be both async and sync?
by John Ament
Section 10.4.4 has the following section which got me thinking
public void refreshOnDocumentUpdate(@Observes(notifyObserver=IF_EXISTS) @Updated Document doc) { ... }
public void asyncRefreshOnDocumentUpdate(@ObservesAsync(notifyObserver=IF_EXISTS) @Updated Document doc) { ... }
I'm wondering, is it OK to have an observer method defined like this?
public void asyncRefreshOnDocumentUpdate(@Observes(notifyObserver=IF_EXISTS) @ObservesAsync(notifyObserver=IF_EXISTS) @Updated Document doc) { ... }
I don't see anything against this in the spec, but I suspect most people are going to think this shouldn't work. So I'm asking the question - should it work?
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.
7 years, 10 months
Is InterceptionFactory a built in bean?
by John Ament
All,
I don't see it explicitly called out in the spec, but should I be able to do this? CDI.current().select(InterceptionFactory.class).get() - e.g. is it a a bean, or can I only access it as a producer method or via BeanManager.createInterceptionFactory() ?
Also, I found in the 2.0 beta 1 spec the following:
public interface InterceptionFactory<T> {
InterceptionProxyFactory<T> ignoreFinalMethods();
I believe InterceptionProxyFactory should be replaced with InterceptionFactory, if we haven't already fixed this.
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.
7 years, 10 months