hi,
Set the transaction attribute for the entity bean to REQUIRESNEW. This will
cause a new transaction to be created and thus the container will commit any
changes before returning control to the session bean. You might be advised
to use a bulk updater with this since a tx will be created for each
setXXXX().
william
> -----Original Message-----
> From: Mike Williams [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 21, 2000 5:51 PM
> To: [EMAIL PROTECTED]
> Subject: Problem mixing Session Beans and Entity Beans
>
> I have a problem.
>
> We have a servlet (S) that calls a session-bean (A) to perform an update.
> Bean A uses an entity-bean (E) to update the status of a database entity
> (let's call it Thing), then calls another session-bean (B) to get a list
> of
> Things with a particular status. Bean B accesses the database directly,
> using JDBC.
>
> We're expecting the Thing that was just updated to be included in this
> list,
> but it's not. Seems that the problem is that the EJB container (WebLogic)
> does not call E.ejbStore() before B does it's query. The EJB spec
> suggests
> that this is quite normal behaviour ... just a shame that we didn't
> understand it before.
>
> So, what to do?? Seems that we either have to pick either session-beans
> OR
> entity-beans to perform database-access, and not try to mix the two. Is
> that a valid conclusion?
>
> Recommendations?
>
> --
> Mike Williams
> http://www.o3.co.uk
>
> ==========================================================================
> =
> 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".
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
===========================================================================
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".