I am trying to get the EJB Observer pattern to work and it seems very straight forward from examples like this:
http://www.devchronicles.com/2011/11/javaee-revisits-design-patterns_28.html
however when I implement the method:
public void doLogging(@Observes String message){
System.out.println("Observed:"+message);
}
the @Observer annotation import does not get inserted.
Also if I do it manually as:
import javax.enterprise.event.Observes;
it does not work looking like I do not have the classes/jars.
I am using EJB 3.0 and am hoping this is not present only in 3.1. If this is the case how can i get the Observer pattern in EJB 3.0?