1 Reply Latest reply on Sep 27, 2002 1:45 PM by dsundstrom

    JDBCLoadRelationCommand takes a lot of time

    resimons

      Hello there,

      I noticed when I set in an enitity bean a relation with another enity bean that is cots a lot of time because of the JDBCLoadrelationCommand.


      My BookingEJB looks like this:

      public void ejbPostCreate(..) {
      ...
      BillLocal bill = billHome.findByPrimaryKey(key);
      this.setBill(bill);
      }

      public abstract void setBill (BillLocal bill);

      The find and update takes 4 JDBC SQL-commands:
      1) JDBCFindByPrimaryKeyQuery (for fethcing the rigth local interface of Bill)
      2) JDBCLoadEntityCommand (for loading the entity bean of Bill)
      3) JDBCLoadRelationCommand
      4) JDBCStoreEntityCommand (for setting the relation)

      The third command loads all records who are related to the bill I'm using. This takes a very lot of time.

      How can I switch the JDBCLoadRelationCommand off?

      Best regards,

      Roel Simons

      PS I'm using Jboss3.0.0a with EJB/CMP2.0 and Oracle 8.1.7