[jbosscache-dev] ComponentRegistry and TransactionManager

Brian Stansberry brian.stansberry at redhat.com
Thu Jan 10 13:39:27 EST 2008


Interesting change from the ComponentRegistry has bitten me in the ass.

The resolution of the TransactionManager used to take place in 
CacheImpl.create(), now it's happening via 
DefaultCacheFactory.bootstrap() -- i.e. as part of cache construction.

This causes problems with the Hibernate integration, which injects the 
TM it knows about into the RuntimeConfig of the already-existing cache, 
before it calls create().  But that's too late -- the 
TransactionManagerFactory has already logged an error about a missing TM.

A solution would be for Hibernate to get a Configuration first, inject 
the TM, and then build the cache.  But the CacheManager API doesn't 
expose a good way to do that.  An external caller can't modify the 
registered configurations.

So:

1) What do you think about changing the ConfigurationRegistry API to 
allow some sort of updating of registered configurations?

2) In general, do you think it's a problem that we are now resolving 
things earlier in the process than we used to?  Other users may also be 
doing things programatically after cache construction but before 
create/start.

-- 
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry at redhat.com



More information about the jbosscache-dev mailing list