Hi!

marc fleury wrote:
> > How do you ensure a unique identifier?
> 
> just like you did the SSB

Even on multi-node (cluster)?

> > Also, remember that the mapping between real PK and jBoss PK must be
> > persistent. With CMP we can simply add it as a column, but how do you
> > intend to solve this for BMP??
> 
> No it doesn't need to be persistent.
> 
> The fastKey is just a way for the cache to say... here next time you come
> back don't bother just use this key.  It is a run-time thing. It signifies
> the association of an EJBObject and the cache context... it is not the
> association of an EJB to an instance, as is currently done, see?

Consider the following:
Client requests entity with PK Foo
Server loads Foo and creates tmp key 17
Client calls Foo/17
Server passivates entity with key Foo/17
(and here is the problem)
Since server cannot keep the entire map of fastkey->key mappings
in-memory (would NOT work with lots of entities during an extended
period of time) it will have to be dropped.
Client calls Foo/17. Server says "huh? I have no idea what PK 17 maps
to.. sorry"

That is the problem. So, you do indeed have to store the mapping between
the fastkey and the real key. How do you intend to do that?

> doing it...doing it...

NO DON'T DO IT.

> it's pretty simple too

I KNOW. But you're shooting yourself in the foot.

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

Reply via email to