[jboss-dev-forums] [Design of JBossCache] - API Issues integrating 2.0.0.DR1 in HEAD

bstansberry@jboss.com do-not-reply at jboss.com
Fri Oct 13 18:48:57 EDT 2006


I'm starting to integrate 2.0.0.DR1 and here's what I've hit so far:

1) How do you set an Option? I thought there was an InvocationContext.currentContext() or something.  Doesn't seem to be.  Only thing I see is a getter/setter in CacheSPI, but my code shouldn't need CacheSPI.

2) It's not possible to learn anything about the cache loader configuration via the Cache interface, unless you're willing to parse an Element. We need to find a way to expose stuff.  Specifically what's needed for session repl are:

a) is there a cache loader?
b) is it set for passivation?
c) is it shared?


Less critical:


3) Let's expose the TransactionManager as a Configuration property. In the session repl case, the cache is using special transaction manager. The session repl code needs to get it so it can control the tx.  For other use cases, if the environment (like JBoss AS) supports it why not dependency inject the TM into the cache rather using a TransactionManagerLookup?  TransactionManagerLookup becomes a fallback for cases where we can't dependency inject.

4) Can we restore Node.getChildrenNames()? Iterating through the child collection and calling getFqn().getName() on each node is a pain.

5) Why is Node.getChildren() a Collection and not a Set? I expect it's because Map.getValues() is a Collection, but properly this method should return Set.

6) The Node interface desribes various returned Collections as being immutable. From a glance at NodeImpl it looks like they aren't. Also, it would be good to be more clear about thread safety as immutable and thread safe aren't the same.

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

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



More information about the jboss-dev-forums mailing list