我们有一个带有 EJB 3.0 模块的应用程序。我们想要覆盖 EJB 实现中的业务逻辑。可能吗?
一旦我覆盖,如何查找或注入被覆盖的会话 bean?
public interface TestRemote {
public String result(String arg1, String arg2);
}
@Stateless
public class TestBeanOne implements TestRemote {
public String result(String arg1, String arg2) {
return "TestBeanOne " + arg1 + arg2;
}
//Is the below code possible?
public class TestBeanTwo extends TestBeanOne {
public String result(String arg1, String arg2) {
return "TestBeanTwo " + arg1 + arg2;
}