5 Replies Latest reply on Jul 28, 2002 1:32 AM by dsundstrom

    CMR one-many very slow

    fabian

      Hi,

      I'm currently running 3.0.0final together with MSSQL 2000 on a 2Ghz P4 with 500Mb RAM.

      I have two beans: ErrorCode and Message. There is a uni-directional Relation from Message to ErrorCode. One Message has excatly one ErrorCode (Message has a ForeignKey to the PK of ErrorCode (bigint)).

      The problem is the following:
      When I want call the CMR-Method setErrorCode(oneErrorLocal) the invocation takes ca. 5 seconds with 100% Load on the CPU! There are no suspicious SQL-Statements in the server log.

      There are ca. 15000 Messages and 7 Error Codes. Is the time normal? With a UPDATE-Statement the time is less than 50ms...

      Thanks in advance,
      Fabian

        • 1. Re: CMR one-many very slow
          dsundstrom

          Have you tried running a profiler to see what it taking the 5 sec?

          • 2. Re: CMR one-many very slow
            fabian

            No, I have read about OptimizeIt in other posts. I have the newest version (4.2). Unfortunately I don't know how to run Jboss3.0.0 final under the profiler.

            • 3. Re: CMR one-many very slow
              dsundstrom

              I have heard that the newest version of OptimizeIt comes with a script to run JBoss. A lot of the JBoss developers use OptimizeIT, so if you can't figure it out, I suggest you ask on the jboss-uses mailing list.

              • 4. Re: CMR one-many very slow
                lkmanda

                Hi I have a problem while setting Cmr Field in ejbPostCreate. can u tell me how did u set the foreign key field in the child table.

                I have one-many relationship between group-users
                and My problem is while setting a groupId (CMR field in users table ( which is a foreign key )

                i created Group entity before creating the Users
                and Iam trying to set the foreign key some thing like this
                setGroupLocal(group)in ejbPostCreate() it doesnot seem to work..

                i see null in the database column groupId in Users table.

                can u tell me why ? and How did u set the foreign key.

                Thanks in advance
                Leela

                • 5. Re: CMR one-many very slow
                  dsundstrom

                  This message is not related to the topic.

                  There is a bug in JBoss 3.0.0 that has been fixed (in 3.0.1rc1 I think).