I figured out what my problem was.  What I was actully doing was this:

  public void myRemoteMethod(Vector record) throws RemoteException {
    try {
      mySessionMethod(record);
    }
    catch (Exception e) {
      //do something, but I didn't re-throw e
    }
  }

 private void mySessionMethod(Vector record)  throws Exception {
  Context    ctx  = Utils.getServerInitialContext();
  Raw_dataHome RDH = (Raw_dataHome) ctx.lookup("Raw_dataHome");
  Raw_data RD = RDH.create(new Integer(dataProviderId), batchTime);
  RD.setShipname((String)record.elementAt(0));
  RD.setShort_desc((String)record.elementAt(3));
  RD.setLead_price_rate(new Integer( (String) record.elementAt(4) ) );
  RD.setLead_price_cat((String)record.elementAt(5));
 }

I neglected an important part of the mySessionMethod signature in last
msg
(private and throws Exception).  I called this method from another
method in the
Stateful bean.  When I did, I wrapped the call to this method in a
try/catch
block.  Since I caught the Exception in the code where I called the
method, the
Exception didn't get propogated to the  Container.  Since the Container
never
"saw" the method, the Container didn't know to roll the transaction
back.  When
I removed the try/catch and declared that I threw an exception instead,
the
Exception was propogated to the Container and the rollback was done.

Changing myRemoteMethod to look like this fixed problem:

  public void myRemoteMethod(Vector record) throws Exception,
RemoteException{
      mySessionMethod(record);
  }


Thanks



--
tcp

Thomas Preston
Vacation.com, Inc.
Engineering Department
617.210.4855 x 124

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to