I see that in EJB 3 it is desirable to have both a local and a remote interface. Then you create a bean that implements these interfaces. Does it matter where the @remote annotation is either on the interface itself (first example) or on a bean of the interface implementation (second example)? This is not just a style issue, is it? Can someone explain the deeper consequences?
@Remote public interface CarSalesRemote { void getSales(); } @Stateless public class CarSales implements CarSalesRemote { @Override public void getsales() {} }
Vs
public interface CarSalesRemote { void getSales(); } @Stateless @Remote public class CarSales implements CarSalesRemote { @Override public void getsales(); }
source share