Session Bean slows bulk JDBC queries by factor of 16 - Weblogic

This is a discussion on Session Bean slows bulk JDBC queries by factor of 16 - Weblogic ; I have a class that reads several thousand database records from numerous tables in an Oracle 9i database. I have tested this class outside of the EJB container, and it returns in about 17 seconds. Within the container, I am ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Session Bean slows bulk JDBC queries by factor of 16

  1. Session Bean slows bulk JDBC queries by factor of 16


    I have a class that reads several thousand database records from numerous tables
    in an Oracle 9i database. I have tested this class outside of the EJB container,
    and it returns in about 17 seconds. Within the container, I am sending a JMS
    message to a queue. A non-transactional MDB picks the message up, and it in turn
    calls a non-transactional stateless session bean. That bean does some logging
    and then calls my database class. However, when running within the container,
    the database class completes in about 280 seconds.

    Experiments I have done on this:
    1. As previously mentioned, I called the database class outside of the container.
    Good performance.
    2. I have tried swapping out our Tx Data Source with a new direct database connection.
    No effect.
    3. I have tried making the MDB directly call the database class. Good performance.
    4. I have created a Servlet that directly calls the database class. Good performance.
    5. I have written a standalone program which calls the stateless session bean.
    Bad performance.

    So it would appear that the problem is not in the database code, the JMS message,
    the JDBC connection, or some other random container process. The stateless session
    bean itself is the slowdown.

    Can anyone recommend how to diagnose what the session bean is doing to my performance?
    I am running Weblogic 6.1 SP4 on Red Hat 9.

    Thanks,
    Andy


  2. Re: Session Bean slows bulk JDBC queries by factor of 16

    You've done good analysis so far. I'd suggestion continuing down that path.

    The simplest case which shows the problem is the base place to start.
    I'd suggest #5 (calling the slsb directly).

    I would suggest instrumenting your code in both the #5 case and the #1
    case (db class outside the container). Let's see the time break down
    for each part of the request. For instance, how much time do you send
    getting the JDBC connection, issuing the sql etc. Ususally by comparing
    these side-by-side, something will jump out at you.

    -- Rob


    Andrew Byala wrote:
    > I have a class that reads several thousand database records from numerous tables
    > in an Oracle 9i database. I have tested this class outside of the EJB container,
    > and it returns in about 17 seconds. Within the container, I am sending a JMS
    > message to a queue. A non-transactional MDB picks the message up, and it in turn
    > calls a non-transactional stateless session bean. That bean does some logging
    > and then calls my database class. However, when running within the container,
    > the database class completes in about 280 seconds.
    >
    > Experiments I have done on this:
    > 1. As previously mentioned, I called the database class outside of the container.
    > Good performance.
    > 2. I have tried swapping out our Tx Data Source with a new direct database connection.
    > No effect.
    > 3. I have tried making the MDB directly call the database class. Good performance.
    > 4. I have created a Servlet that directly calls the database class. Good performance.
    > 5. I have written a standalone program which calls the stateless session bean.
    > Bad performance.
    >
    > So it would appear that the problem is not in the database code, the JMS message,
    > the JDBC connection, or some other random container process. The stateless session
    > bean itself is the slowdown.
    >
    > Can anyone recommend how to diagnose what the session bean is doing to my performance?
    > I am running Weblogic 6.1 SP4 on Red Hat 9.
    >
    > Thanks,
    > Andy
    >



+ Reply to Thread