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

manik.surtani@jboss.com do-not-reply at jboss.com
Tue Oct 17 10:00:59 EDT 2006


anonymous wrote : 
  | 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.
  | 

* What callback do I need to provide for the DI from the MC?
* The TM can be retrieved using the CacheSPI, again perhaps this could be downgraded to be accessible from Cache.  Accessing this from the Configuration doesn't make much sense since the Configuration should be a valid, testable and checkable object even when the cache is not running while the TM is a resource that should only be available when the cache is running.


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

I agree - will do.

anonymous wrote : 
  | 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.
  | 

You guessed why.  :-)  Does it make more sense as a Set?  I suppose so, since only one instance of each child would exist.  I'd need to think of an efficient way to do this though, as iterating and creating a new set every time getChildren() is called is sub-optimal.

anonymous wrote : 
  | 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.
  | 

Which ones aren't?  I may have missed some.  The point is not for thread safety, but so changes go through the Node or Cache API and hence the interceptor stack.


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

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



More information about the jboss-dev-forums mailing list