4 Replies Latest reply on May 14, 2004 10:03 AM by fhaion

    JBoss not loadding CMP entity beans - please help

    stscit04

      Hi,

      I am using Jboss 3.2.3 and MySQL 4.0.14. JBoss shows the following
      strange behaviour: I am able to call findByPrimaryKey(String pk) on
      a entity bean, but when I invoke getXXX on the bean instance returned
      by the finder, the execution stops at this point. The entity beans are CMP
      and I call them from a stateless sessionBean via the local interface.

      The server.log shows that the command
      [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Bank#findByPrimaryKey] Executing SQL: SELECT id FROM Bank WHERE id=?

      is executed, but unlike other querys, the JDBCLoadEntityCommand is
      not executed. Jboss continues after the corresponding transaction times out.

      I am totally stuck here for days now, please help me !!
      Thanks in advance

      Stefan

        • 1. Re: JBoss not loadding CMP entity beans - please help
          wdfink

          Hi Stefan,
          ne a bit more Information, a bit of the deploymentdescriptor an a code fragment.

          Wolf

          • 2. Re: JBoss not loadding CMP entity beans - please help
            aloubyansky

            Does the finder return any value or hang?

            • 3. Re: JBoss not loadding CMP entity beans - please help
              stscit04

              Thanks for the replys!

              The problem is now solved,
              it was a transaction issue. What was puzzeling me is that
              the finder returned a valid entity instance and the block
              occurs on the first invocation of a getXXX method.

              FYI The problem was that I was finding the entity X in Transaction
              A, then starting a new Transaction B (by calling a different sessionBean
              with the Transaction type = "RequiresNew" ) and finding the same
              entity again in Transaction B. Sort of an deadlock that is not detected.

              so long

              Stefan

              • 4. Re: JBoss not loadding CMP entity beans - please help
                fhaion

                Hi,

                I got the same problem, but I didn´t find a correct answer for that. I am working with JBoss 3.0.8 / Jetty Webserver. I´ve the same constellation, means two different sessionBeans (two transactions) finding the same entity bean. The invocation of getXXX method throws sometimes an exception and sometimes I got an deadlock error (server.log). In all cases the findByXXX method was sucessful.

                I would like to ask you Stefan, could you explain your solution to me? What have you done to get it working correctly?

                Thanks, Frank