Reputation: 4160
In our solution there are a number of stateless session beans that implement CXF SOAP services or RESTEasy endpoints.
Like this:
@Path( "/" )
@Stateless
@TransactionAttribute( TransactionAttributeType.NEVER )
public class ValidationBean {
// ...
}
I've some beans that actually don't need a transaction, like the one above. So I applied: @TransactionAttribute( TransactionAttributeType.NEVER )
.
For others (mainly the CXF SOAP endpoints) I explicitly added @TransactionTimeout( 300 )
.
When doing this I wondered what timeout configuration would be used to the method calls on these REST endpoints. I thought there should be none, since there's no transaction anymore. But apparently there still are. These seem to be shorter than the default transaction timeout (our regression tests start to fail on lengthy REST Request, still need to investigate).
Questions:
@TransactionAttribute( TransactionAttributeType.NEVER )
does @TransactionTimeout( 300 )
still apply?Exception on the REST call:
ERROR [io.undertow.request] (default task-19) UT005023: Exception handling request to /validation/cpt/rest/correct/27376655: org.jboss.resteasy.spi.UnhandledException: javax.ejb.EJBException: org.hibernate.LazyInitializationException: could not initialize proxy [nl.broservices.entities.sss.cpt.DeliveredVertPositionEntity#197769336] - no Session
Upvotes: 0
Views: 350