0 Replies Latest reply on Dec 25, 2001 6:14 PM by garyg

    what is container doing here ...

    garyg Novice

      The problem is during an ejbFindByPriority method where I
      populate instance variables. The JDBC calls in this method do
      sql SELECT queries to get the needed values, but at the very
      end of the method, the fields all become 0 or null. So the
      client is not getting the values just queried from the dbase.

      On the very last sql SELECT query of my ejbFindByPriority method,
      when I do a getter method on an instance variable, the value is
      zero. If I comment out this select, then it happens w/ the one
      before it. I'm sure my code is clean and I'm not resetting these
      values anywhere's, but it's like the bean is being switched out
      for a new one or the container is doing something, but in the middle of an ejbFindByXXX call?

      My JBoss container makes calls in the following order.

      ejbCreate()
      ejbPostCreate()
      ejbStore()

      Then my client program calls ejbFindByPriority() which then does
      the following:
      ---

      Context ctx = new InitialContext();
      Object result = ctx.lookup("FieldKit");

      FieldHome home = (FieldHome)
      javax.rmi.PortableRemoteObject.narrow(result, FieldHome.class);

      field = (Field) home.findByPriority(IFields.HIGH);
      pk = (FieldPK) field.getPrimaryKey();

      // then elsewhere in my client program I'd do ...
      if (field.getVersion() == 0) {
      // which of course if falls through here and shouldn't because
      // the ejbFindByPriority queried for this value, but somehow
      // it got reset.
      }

      I believe it got reset during the queries of the
      ejbFindByPriority() method according to my log output.


      Any help much appreciated.