3 Replies Latest reply on Aug 9, 2002 5:36 PM by feilhasa

    JBoss single tasking?

    ibutcher

      Preamble: I have an J2EE app which consists of about 30 entity (CMP) beans, a couple of dozen stateless session beans and a large number of JSPs. I am using JBoss 244 with Tomcat 3.2 on a laptop (700 mhz, 512mb) running W2k.

      By and large JBoss is behaving very well but one or two of the TX in the system can last for long periods of time, from 20 seconds to several minutes. While one of these long running TX is running it is impossible to perform any other tasking in the UI from other browsers. I know that the laptop is able to allocate resources to other (non-JBoss) tasks.

      I was wondering if there is any way to prevent this happening (or to find out why it is)? I am reluctant to break up the TX if possible as I use some pretty drastic caching of intermediate results in the it. Are there any JBoss/session bean tuning parameters?

        • 1. Re: JBoss single tasking?
          feilhasa

          I've experienced the same thing. Have you got any solutions yet?

          Thanks

          • 2. Re: JBoss single tasking?
            ibutcher

            I have fixed this in an OK fashion. What I ended up doing it setting the <trans-attribute> for the main session beans involved to 'NotSupported'. This meant that this one TX didn't recruit huge numbers of beans and therefore lock up the system. You have to be careful here because if you are writing to a database you don't want to use 'NotSupported' as I believe your updates won't get written through. I had this problem and for that session bean only I used 'Required' (which will set up many small TXs over the use case).

            Interestingly enough as the code was, in 2.4.6 w/Tomcat 4 when you try to invoke another use case from another browser you eventually get a DeadLock exception.

            • 3. Re: JBoss single tasking?
              feilhasa

              Hi, I finally got it to perform somewhat muti-tasking now.
              I am using jboss3 final, and CMP.

              I did it by setting the locking policy to org.jboss.ejb.plugins.lock.MethodOnlyEJBLock and set my stateless bean transaction attribute to requiresnew.
              It looks like long transactions are not blocking other transactions from the users point view. However, transactions are put in a queue and handled in a single task manner.

              I wish someone could tell me how to have these inserts in the transactions happen concurrently.

              I basically have one stateless sessionbean that has a method that does a lot of insert in a container managed transaction (RequiresNew) (10minutes). I have 2 clients calling it, it seems server is doing transaction one by one.

              Some one please help.