I have an interface :
public interface LogBookService extends EntityService<LogBookEntity, Long> {
void writelogNewTransaction(LogBookEntity log);
}
and its implementation :
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class LogBookServiceImpl implements LogBookService {
@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public void writelogNewTransaction(logBookEntity logbook) {
final List<String> params = new ArrayList<String>();
new getRepository().merge(entity);
}
}
and a third service :
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class GalaxyServiceImpl implements GalaxyService {
@Resource
private SessionContext sessionContext ;
public void test() {
for (LogBookEntity log : LogBookEntities) {
sessionContext.getBusinessObject(LogBookService.class).writelogNewTransaction(log);
}
}
}
When I called a GalaxyServiceImpl via a web service for example, I get this error:
SystemErr R java.lang.IllegalStateException: Requested business interface not found : LogBookService
SystemErr R at com.ibm.ejs.container.SessionBeanO.getBusinessObject(SessionBeanO.java:677)
can you tell me why please?