im is currently being developed using jsf 2, jpa 2 and spring 3.
I think I fully understand the use of @Transactional and its distribution, but stil, which only applies to one thread, which in my case is one response request from my webapp
Basically, I need:
- A remote business service client is one that initiates and completes a transaction.
- spring wil translate exceptions if any exception occurs
Here is an example that I hope can describe the intention:
- the client (assuming it is a mobile device, not necessarily a webapp) will ask the server to create a new transaction
- server returns transaction id
- the client calls service A, passing the transaction to use
- serviceA is running using a transaction (based on the transaction completed), but the transaction is not committed
- the client continues to call serviceB, passing the same transaction to use
- serviceB is started using a previous transaction initiated by serviceA
- If serviceB is working correctly, the client may ask the server to complete the transaction based on transactionId
- If serviceB works with exception, spring can then perform sql exception conversion
Is it possible?
Thank!
source
share