我使用Wildfly-8.2.0,並有一個像EJB:HornetQ的併發會話使用EJB中
@Singleton
public class MySingleton {
@Inject JMSContext jmsCtx;
public void addMessageToQueue(...) { ... }
}
和我看到的錯誤: Invalid concurrent session usage. Sessions are not supposed to be used by more than one thread concurrently
經常從addMessageToQueue方法的日誌。
由於這是一個單例EJB,因此應用具有默認@Lock(WRITE)的容器管理併發。我不明白這個錯誤是可能的。
你能提供堆棧跟蹤嗎? – 2015-04-05 00:47:28