Mike,
If you have really tracked the problem down to WebLogic not calling
ejbStore, then I concur with others who have advised using REQUIRES NEW in
the entity bean to force a txn commit. Otherwise, you might try changing
the txn's isolation level to READ_UNCOMMITTED to allow "dirty reads" for
your particular scenario.
PS: I shy away from REQUIRES NEW unless absolutely necessary, since their
may be use cases where the bean needs to "be a team player" and commit
within a larger unit of work.
Jason
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Mike Williams
Sent: Monday, February 21, 2000 10:51 AM
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".
===========================================================================
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".