Jim Richards wrote:
>
> At 01:34 PM 22/11/99 +0100, Gustaf Andersson wrote:
> >Hi,
> >
> >I'm involved in a project that uses EJB's. I have an
> >entity-bean that can be locked and unlocked from the
> >client's and the probem is this:
> >When one client unlockes the bean (using a boolean that is
> >not mapped the database) it doesn't seem like the other
> >clients use the same boolean, because the boolean they
> >uses is still "locked".
> >Does someone know where the problem is, or could be? Any suggestions
> >are very welcome.
>
> You are not guareenteed to be using the same instance of an object
> with entity beans. Why do you want to do this locking anyway? There are
> other way of doing this with either the transactional attributes or with
> a boolean in the database (so other non-ejb applications can make use of it)
>
> If you really need to do this make the boolean a static variable, this means
> there is only one for all instances.
>
> --
> Subvert the dominant paradigm
> http://www.cyber4.org/members/grumpy/index.html
Hi Jim,
thanks for the reply.
The reason that I want the locking is this:
The bean represents rows in a large table that also containes large
BLOB:s.
But I dont want the BLOB:s in the EJB server's memory, and I also dont
want
the EJB server to perform the READ/WRITE of BLOB:s due to capacity
reasons.
Therefore I have constructed a BLOB server that functions as a stream
server
for BLOB:s. For example, the server lockes the bean for READ of a BLOB
when
a user writes the BLOB to the database through the BLOB server.
I welcome any comments on this solution.
Thanks
/Gustaf