24.12. Transactional Requests
By default, no transaction is active during a remoting request. If you wish to update the database during a remoting request, you must annotate the
@WebRemote
method with @Transactional
, like so:
@WebRemote @Transactional(TransactionPropagationType.REQUIRED) public void updateOrder(Order order) { entityManager.merge(order); }