Hi Dan,

> There is no automatic time-out mechanism in J2EE that you could
> adapt for use in a pessimistic locking scheme. One possibility
> might be to store leasing information along with check-out
> information. When a conflicting client tries to obtain a lock, the
> existing lease could be examined for validity.

But what happens, If the client crashes, how the stored leasing information
would be set back ?

> I'm not sure what you mean by using stateful session beans to
> organize entity beans like leased resources.

I had the idea, that a client who wants writing acces to an EntityBean, get
it from a SessionBean, who stores in an Array, which EntityBeans where
locked. But I think this gives the same Problems like storing leasing
information in the EntityBean, or not ?

> -Dan
>
> P.S. I probably should have mentioned before that optimistic
> locking is generally a more favorable approach except in situations
> where the optimism is unjustified--i.e. high contention for the same
> data; or in situations where backing out a transaction has high
> costs--e.g. a lot of work is done during "client think time."

Is it possible to start a transaction from the client and commit it from the
client ?

CU

---
Ingo Bruell
OBL GmbH ([EMAIL PROTECTED])
Hude (Oldenburg)
Germany



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to