This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Write operations are not allowed in read-only mode (FlushMode.NEVER/MANUAL)
posted 6 years ago
I am getting this exception:
I read somewhere online that I have to wrap my the classes in transactionProxies. I am doing so for wfControllerMdb which is a MessageListener and where the initial request is made.
my initial call at the top of the stacktrace is wrapped in a proxy:
I am also doing in my OrderManager which makes the final call to my entityManager to save:
and my entityManager which is in charge of saving is also wrapped in a transcationProxy:
So WFControllerMdb (wrapped in txProxy) calls a couple of objects:
those objects get the OrderManager bean from my beanAwareFactory (wrapped in txProxy) and call updateOrder.
then OrderManager(wrapped in txProxy) calls entityManger (wrapped in txProxy) to save the order.
I am pretty sure that no where in my code any transaction is marked as readonly, so the question is why am I getting this error message.