[infinispan-dev] Making components depend on Transport using @Inject

Manik Surtani manik at jboss.org
Sun Jan 8 14:24:40 EST 2012


Guys

We need to be a little careful here - don't just have components depend on Transport unless you know for sure that the component is only used in a clustered mode.  Otherwise, even in local mode, you will end up creating and starting a channel which is unnecessary.  I have seen this in the CacheLoaderInterceptor, AbstractLockingInterceptor and the RemoteCommandsFactory so far.  Please consider either alternate implementations of these components for clustered mode - which can in turn depend on Transport, as I have done with the CacheLoaderInterceptor - or instead depend on the RpcManager which gives you almost all of the same functionality without starting up channels unnecessarily.  Or worse still, the dependency on Transport in the RemoteCommandsFactory wasn't even used!

Cheers
Manik
--
Manik Surtani
manik at jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org






More information about the infinispan-dev mailing list