Sjaak
Sjaak

Reputation: 4160

@TransactionAttribute( TransactionAttributeType.NEVER ) on SSB seem to change timeout. On JBOSS EAP 7 (and Wildfly?)

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:

  1. When you explicitly desire no transaction @TransactionAttribute( TransactionAttributeType.NEVER ) does @TransactionTimeout( 300 ) still apply?
  2. If not, which other time out becomes active?
  3. If not, can I configure this with some kind of annotation?

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

Answers (0)

Related Questions