EJB3 façade over Spring services
http://java.dzone.com/articles/ejb3-fa%C3%A7ade-over-springUsing Spring’s EJB implementation support classes
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/ejb.html#ejb-implementation-ejb3import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor;
import ch.frankel.blog.ejb.spring.service.client.RandomGeneratorService;
@Stateless
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class RandomGeneratorBean implements RandomGeneratorService {
@Autowired
private ch.frankel.blog.ejb.spring.service.RandomGeneratorService delegate;
@Override
public int generateNumber(int lowerLimit, int upperLimit) {
return delegate.generateNumber(lowerLimit, upperLimit);
}
}