[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBMICROCONT-330 - Preconfigured MDR and scopes (Repost)

adrian@jboss.org do-not-reply at jboss.com
Fri Aug 8 12:54:49 EDT 2008


"alesj" wrote : This move
  | -   protected MetaDataContext createMetaDataContext(List retrievals)
  | made the following classes:
  |  - CachingBasicKernelMetaDataRepository (org.jboss.kernel.plugins.metadata.basic)
  |  - PolicyCachingBasicKernelMetaDataRepository (org.jboss.kernel.plugins.metadata.basic)
  |  - LRUPolicyCachingBasicKernelMetaDataRepository (org.jboss.kernel.plugins.metadata.basic)
  |  - TimedPolicyCachingBasicKernelMetaDataRepository (org.jboss.kernel.plugins.metadata.basic)
  | useless, since they don't serve the caching override function anymore.
  | 

You should add @Override so it doesn't compile if somebody refactors
the callback.

Why didn't I see any failing tests? I must be blind?

anonymous wrote : 
  | What's the best way to port this?
  | Overriding this in some ControllerContext impl doesn't seem like a good fit.

I don't think there is a one best way. The simplest would be to allow
a setMetaDataContextFactory() on the ScopeInfo, it could be set
by the BasicKernelMDR if you want.

If you wanted to be "clever", you could make it a piece of metadata itself. :-)
i.e. which MetaDataContextFactory to use by looking through the retrievals
before you construct it. That would allow application and system wide construction,
but how it gets populated is a different question.

NOTE: The deployers also do this, see DefaultScopeBuilder,
although there you can override it by adding a ScopeBuilder attachment
to your deployment.

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

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



More information about the jboss-dev-forums mailing list