[jboss-dev-forums] [Design of JBossCache] - Re: Implicit marshalled values - a better way of handling re

jason.greene@jboss.com do-not-reply at jboss.com
Wed Jan 2 14:42:47 EST 2008


"bstansberry at jboss.com" wrote : Twist on this I just remembered.  With entity caching, user types can be part of the FQN as well.  Primary key of the entity is the last element of the FQN. A user type in an FQN is of course generally possible; entity caching is just a particular example where I've had to handle it with region-based marshalling.  (The region portion of the FQN is only strings).

IMO we should start requiring that FQNs are only composed of serializable types that are on the cache classpath. POJO Cache does a very similar thing to entity caching, and it should also be changed not to do this. We should instead compute a value based off of the hash code. In my case, which should be possible with an entity cache, I can actually allow collisions, by simply using the key object as an attribute (key) on the node, instead of the last element of an fqn. The value of the key would point to an internal fqn, containing the data of the object. Alternatively, a sub fqn structure could be created using a unique value. In this alternative case, you would have to iterate all children, performing a comparison.

-Jason



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116521#4116521

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116521



More information about the jboss-dev-forums mailing list