5 Replies Latest reply on Jun 13, 2006 4:25 PM by bobgus

    Hanging threads...

      When I query EJB3 OneToOne entitybeans, the EntityManager just keeps running and take processing speed, but don't finish executin. Is there a way to solve this problem?

      I am a newbie when it comes to EJB's and it is quite possible that I use the entity manager in a way I shouldn't.

      I have a entity bean which have a referance to another entitybean (just a local variabel: syntax - private = null; - with getters and setters: public <Entity Bean> get() - and - public set<Entity Bean>(...).
      The query looks like:
      from e
      inner join fetch e.

      When I call the createQuery(query).getResultList() method on the EntityManager, it just "hangs" and uses lots of prosessing power.

      The last debug which comes from JBoss is:
      2005-08-04 17:12:42,178 DEBUG [org.hibernate.impl.SessionImpl - 409] after transaction completion

      Anyone... Please help...

        • 1. Re: Hanging threads...

          Hmmm... It seems like the message got screwed up by the Html. Here is a new one:

          ...
          I have a entity bean which have a referance to another entitybean (just a local variabel: syntax - private <Entity Bean> = null; - with getters and setters: public <Entity Bean> get<Entity Bean>() - and - public set<Entity Bean>(...).
          The query looks like:
          from <An Entity Bean> e
          inner join fetch e.<Another Entity Bean>
          ...
          Additional information: In the query where <An Entity Bean> is stated: this is its whole class name (e.g. some.package.EntityBean) and the fetch is the name of the variabel.

          I have also tried it the other way around with the AnotherEntityBean as parent bean of AnEntityBean, but then with a ManyToOne relation, but this does not work as intendet either. With the query syntax stated I get an instance of the parentbean according to the number of children...

          • 2. Re: Hanging threads...

            Anyone with an Idea? Maybe just a link to examples or simular? I have gone through the EjbTrial.ear file, but I cannot see what I am doing wich is wrong...

            • 3. Re: Hanging threads...
              • 4. Re: Hanging threads...

                Thanx for the links.

                It seems to be some sort of livelock or loop that gets executed becautse nothing happens but an extraordinary amount of executing time is stolen.

                The thing which is a problem is that this is not happening in my own code, but in JBoss.

                Suggestions?

                • 5. Jboss in livelock. Not giving thread dump
                  bobgus

                  I have a livelock situation with jboss.

                  kill -QUIT nnnn

                  does not seem to work (ignored by java process running jvm.

                  Only

                  kill -9 nnnn

                  is recognized by the java process.

                  Is there some signal mask or other jujitsu that needs to be done to get java jboss to give me a thread dump on the way down?