Definitely worth noting that this example uses one of the more clever EJB3 rules for default values. The bean class uses the annotation *@Remote* but does not specify a list of interfaces as is normally required. Per EJB3 rules, if the bean implements exactly *one business interface* it may use @Remote with no other values and that business interface is then implied to be a remote business interface. The same rule applies to identical usage of @Local.
The critical thing to know is that if you add another interface the rules change and require that you specify both interfaces in the @Remote annotation as in @Remote({Telephone.class, SecondInterface.class}).
|