Using Java 7 with Jboss7 the following code used to work.
@Singleton
public class OperacaoServiceImpl implements OperacaoService {
private Operacao operacaoEmAndamento;
@Override
@Lock(LockType.READ)
public Operacao getOperacaoEmAndamento() {
return operacaoEmAndamento;
}
@Override
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void geraEIniciaOperacao() throws CoreException {
geraOperacao();
iniciaOperacao();
}
}
Now I've migrated to Java 8 with Wildfly it stopped working. If geraEIniciaOperacao is still running, I can't access getOperacaoEmAndamento.
" javax.ejb.ConcurrentAccessTimeoutException: WFLYEJB0241: EJB 3.1 PFD2 4.8.5.5.1 concurrent access timeout on OperacaoServiceImpl - could not obtain lock within 5000MILLISECONDS at org.jboss.as.ejb3.concurrency.ContainerManagedConcurrencyInterceptor.processInvocation(ContainerManagedConcurrencyInterceptor.java:106) ..."