[jboss-dev-forums] [Design of JBossCache] - Re: PojoCache uses a special node factory

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Jan 8 12:27:25 EST 2007


"bstansberry at jboss.com" wrote : "manik.surtani at jboss.com" wrote : 
  |   | This possibility always was there, even the way the NodeFactory was used before - and still is in JBC 1.x.y -  as a Singleton.  That's the whole purpose of a factory.
  | 
  | I'm not sure how it can be done in 1.x, as NodeFactory doesn't expose any way to change the singleton.

You'd have to:

1)  Subclass Node to add more specialised behaviour, maps, locks, etc. tuned for this (InternalNode?)  Perhaps even add more specialised checks that "user" methods like get() and put() from the Node interface throw exceptions so end-users don't mess with these regions?

2)  The factory would have to instantiate the appropriate class, based on the Fqn requested.  

Changing the NodeFactory wouldn't help anyway, without 1) and 2) above, and wouldn't really add much specific benefit given how few InternalNodes would ever be created (just /_JBoss_Internal_ and /_BuddyBackup_?  I don't think sub-nodes under /_JBoss_Internal_ and /_BuddyBackup_ needs any further special behaviour?)

  

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

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



More information about the jboss-dev-forums mailing list