1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] Do suspended transactions timeout?

Discussão em 'StackOverflow' iniciado por Stack, Maio 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have an JEE application which runs on a JBOSS EAP 7. There is a long running asynchronous method which does import data into another system. After beeing triggered it runs into transactions problems after 5 minutes which is the JBOSS default transaction timeout. So far so good. I changed the behaviour (pseudo code):

    Before:
    @Transactional(Required) //which is default
    //The whole process takes usually longer than 5 min
    void doImport{
    for(n-number of datsets){
    importOneDataSet();
    }
    }

    After:
    @Transactional
    void doImport{
    for(n-number of datsets){
    importOneDataSet();
    }
    }
    ...
    @Transactional(Requires_New)
    //a new transaction is created and the "outer" is suspended
    //to import one dataset is below 5min
    void importOneDataSet(){
    ...
    }


    I assumed that the outer transaction timeout is stopped when it is paused/suspended but I still run into a transaction timout error after 5 minutes.

    So it seems that suspending transactions does not influence its transaction timeout? Is that app server specific our is it defined in the JEE standard? And the third question would be: How would you solve this problem? Don't open the outer transaction? Increase the timeout (only) for that transaction?

    It is puzzling that most transaction articles I read doesn't even mention that fact. The only hint regarding that topic was one blog post.

    Continue reading...

Compartilhe esta Página