Tom,
By virtue of deploying both beans as TX_REQUIRED, the behavior you desire
(e.g. single atomic unit of work) is automatically provided by the EJB
server/container.
-Chris.
> -----Original Message-----
> From: Tom Preston [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, May 18, 2000 12:53 PM
> To: [EMAIL PROTECTED]
> Subject: Transaction question
>
> I have a session bean talking to an entity bean both are TX_REQUIRED. I
> have a method in the
> session bean that calls create and multiple set methods in the entity
> bean. It does somethhing like this:
>
> public void mySessionMethod(Vector record) {
> 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));
> }
>
> How can I get these calls all to be in a single transaction so that if
> an error in any set method, everything including create is rolled back?
>
> --
> 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".
===========================================================================
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".