I've been using jboss for a couple of months now and overall I am very
pleased with it.

The problem I rumming into is that I cannot debug the findByPrimaryKey
method in PRE2-1 as I could in 2-0_Final.  I cannot get any print
messages
from this method although I can on all other bean methods.

The client can find beans with no problem however the bean does not
through a FinderException if a database row does not exist.  I get a
primaryKey reference to
nothing. ?

Unfornunately, now I have to impliment 'not found beans' by issuing
direct
sql in a stateless session bean.

I know there is some container optimization invloved how can I debug the

ejbFindByPrimaryKey method of the bean.

I never actually see this method get called but once I try to access a
getMethod I see a call to ejbLoad.

I've been using jboss for a couple of months now and overall I am very
pleased with it.

The problem I rumming into is that I cannot debug the findByPrimaryKey
method in PRE2-1 as I could in 2-0_Final.  I cannot get any print
messages
from this method although I can on all other bean methods.

The client can find beans with no problem however the bean does not
through a FinderException
if a database row does not exist.  I get a primaryKey reference to
nothing. ?

Unfornunately, now I have to impliment 'not found beans' by issuing
direct
sql in a stateless session bean.

I know there is some container optimization invloved how can I debug the

ejbFindByPrimaryKey method of the bean.

  /**
     * Find by a primary key
     */
    public Tbh3LstPk ejbFindByPrimaryKey(Tbh3LstPk pk)  throws
FinderException,
RemoteException {
         log("ejbFindByPrimaryKey");
        PreparedStatement ps = null;

      //set class level variables to primary key values

      this.cmpy = pk.cmpy;
      this.btch_num = pk.btch_num;
      this.pk = pk

     try {
      connection = dataSource.getConnection();
       String sql =
 "SELECT "
 + "CMPY, "
 + "BTCH_NUM "
 + "FROM TBH3LST "
 + "WHERE "
 + "CMPY= '" + pk.cmpy + "' "
 + "AND BTCH_NUM=  " + pk.btch_num + "  ";

     ps  = connection.prepareStatement(sql);

     //set primary key in prepared statement
      log(sql);
     ps.executeQuery();
     ResultSet rs = ps.getResultSet();
     if (rs.next()) {

         //set class level variables
         this.cmpy = rs.getString(1);
         this.btch_num = rs.getInt(2);

        log("ejbFindByPrimaryKey: found");
     } else {
          log("ejbFindByPrimaryKey: not found");
          throw new FinderException();
     }
 } catch (SQLException sqe) {
     log("SQLException:  " + sqe);
     throw new EJBException(sqe);
 } finally {
     try {
         ps.close();
         connection.close();
     } catch (Exception e) {e.printStackTrace();}
 }
 this.modified = false;
 return pk;
 }






--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to