public class BaseParam {}
public interface BaseInterface<T extends BaseParam> {
public void doSomething( T param);
}
public class SpecialParam extends BaseParam{}
public interface SpecialService extends BaseInterface<SpecialParam> {}
@Stateless
@Local(SpecialService.class)
@SomeCDIInterceptorBinding
public class SpecialServiceImpl implements SpecialService {
public void doSomething( SpecialParam param) {}
}
@EJB
private SpecialService s;
...
s.doSomething(new SpecialParam());