[TxPolicy] javax.ejb.EJBTransactionRolledbackException: Wrong target. class com.sample.mock.service.MockFinanceService for public long com.sample.mock.service.MockFinanceService.createFinancialTransaction(com.sample.mock.service.params.MockFinanceTrasactionParam)
我的无状态 bean 类是:
@Stateless(mappedName = "MockFinanceService")
public class MockFinanceService implements MockFinanceServiceLocal {
....
}
本地界面为:
@Local
public interface MockFinanceServiceLocal {
public long createFinancialTransaction(MockFinanceTrasactionParam mockFinanceTrasactionParam);
}
我按如下方式调用服务:
MockFinanceServiceLocal mockFinanceServiceLocal = (MockFinanceServiceLocal) new InitialContext().lookup("FinanceEAR/MockFinanceService/local");
......
mockFinanceServiceLocal.createFinancialTransaction(mockFinanceTrasactionParam);
请帮助我了解问题所在。