4 Replies Latest reply on Apr 2, 2002 4:57 AM by imran

    Deadlocks in a J2EE environment?

    Bertram Julius Newbie

      I am fairly new to J2EE programming, and i am still a student. I am currently doing research about above mentioned topic. Is there a real concern about deadlocks in this environment or is it just certain web application servers that cannot handle deadlocks effectively? I am also looking to obtain resources, which i can use in my research?

      If anyone has ideas or urls to resources it would be greatly appreciated.

        • 1. Re: Deadlocks in a J2EE environment?
          Jari Kujansuu Newbie

          Hi,

          At least from own experience I can say that deadlocks can be problem in J2EE environment, like in any other environment with multiple users needing shared resources.

          In our tests some months ago we noticed that with multiple users doing certain things at same time resulted in situation where everyone was waiting others to finish. Everyone wanted access to same entity beans.

          But with playing around with transactions and redesigning some parts that problem was solved, first as quick hack and now doing more complete redesigning.

          • 2. Re: Deadlocks in a J2EE environment?
            Madhusudan Chaganthi Newbie

            Hi

            Could you elaborate on what kind of situation resulted in dead lock with entity beans(CMP or BMP)?

            I am guessing that our current problem might be related to what you are talking about.

            Any information will be much appreciated.

            Thanks
            Madhu

            • 3. Re: Deadlocks in a J2EE environment?
              Bertram Julius Newbie

              Hi

              We do not get deadlocks at the moment, because we do not use transactions. The moment we introduce transactions into the project the risk of deadlocks becomes real. The problem with this is that we rely on the fact that no Exceptions will occur which will destroy the integrity of the database.

              • 4. 378606
                imran Newbie

                well we did come across some deadlock scenarios during the development of one of our apps using Jboss. And drilling down and thanx to some of the JBoss guys we got a patch which Jboss detects a deadlock and throws an ApplicationDeadLockException. 2.4.4 version didn't have it. I beleive the newer versions come with that patch now. The exception is thrown wrapped in a RemoteException. So we explicitly caught it and handled it the way we want it.
                Hope this helps cos i know how terrible it is when this kinda problems crop up.

                Have fun!
                Cheers
                Imran