[infinispan-dev] Stuck on old configuration API
Sanne Grinovero
sanne at infinispan.org
Mon Mar 5 19:10:17 EST 2012
Hi,
I'm confused on the new configuration API; while it's definitely an
improvement to understand the XML parsing, it seems functionality is
reduced too much.
Previously I could set the instance of an existing (already
instantiated) service, especially Transport and
TransactionManagerLookup which I need to override/reuse instances.
Now if I look into the .transport() section I see no setters at all,
unless I chain a *second* .transport() which reveals some unintended
public details [and looks awkward]:
cacheManager.getCacheManagerConfiguration().transport().transport().setConfiguration(
GlobalConfiguration gc );
but no way to override the instance.
Regarding the TransactionManagerLookup, I just realized that this is
the third rewrite of the whole configuration read/build and that it's
now living in flux between THREE generations in the same codebase,
with adapters from new, to fluent (2nd gen), to "legacy" which I
happen to still need as even using 2nd gen it delegates to it.
I had added a test to Infinispan core to make sure I would not end up
stuck on this, but all my tests are using the "old" 2nd generation API
from Infinispan 5.0 and were not migrated forward, so they didn't
highlight this problem.
I've secured a written authorization to shoot if someone attempts to
remove one of those deprecated methods.. sorry but now that 5.1 was
released it's too late to cleanup.
More information about the infinispan-dev
mailing list