i have a container managed transaction in a REST call with default liberty timeout of 120sec.
I want for a specific operation withtout spawning a new transaction to extend it to 5 minutes. how can i do this?
I know I can change timeout in server.xml, but this would change timeout for all operations.
Liberty UOWManager SPI
You could use the Liberty UOWManager SPI, but you'd have to "clean up" after setting a custom timeout if you want later methods to revert back to the default timeout once this thread goes back to the Liberty thread pool and gets reused.
Transactional CDI Bean
JAX-RS resource class
pom.xml
You can add this dependency to your Maven build with an entry like (the version might seem kind of random; it's tied to the Liberty fix pack version but this type of SPI won't likely change too frequently across versions).