Thanks for the quick response Rickard. I just wanted to make sure the
container wasn't doing anything in this scenario.
Cheers
Jay Walters
-----Original Message-----
From: Rickard �berg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 02, 2000 6:23 AM
To: jBoss Developer
Subject: Re: [jBoss-Dev] Entity bean timing question
Hi!
Jay Walters wrote:
> Client A calls a stateless session bean (A) which starts a new transaction
> Stateless session bean A issues call to finder Collection
> FooHome.findCheapFoos()
> Foo A issues SQL from the ejbFindCheapFoos() - select id, description,
price
> from foo where price < 10.00;
> Foo A returns a collection of FooPK to the container including pk of Foo X
> Client B calls a stateless session bean (B) which starts a new transaction
> Stateless Session bean B issues call to FooHome.findFooByPK( pk of Foo X )
> Stateless Session bean B then updates Foo X so it's price goes from 9.00
to
> 11.00.
> Stateless Session bean completes transaction and commits change to bean to
> database
> Container decides to load bean X and now reads the new price 11.00... oh
oh
And the problem is..? You hint that A will now have a problem since X is
not cheap anymore. But the above is perfectly normal considering the
transaction semantics. If you want to handle the above you must do so in
application code, since there is nothing in the above which is bad from
a container perspective.
regards,
Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com