[infinispan-dev] ComponentRegistry, rewiring and @NonVolatile

Manik Surtani manik at jboss.org
Sun Oct 11 19:44:19 EDT 2009


I have spent some time with this over the weekend, and here is where I  
think we stand:

The main reason why we needed the @NonVolatile annotation and the  
ability to rewire components prior to starting is because JBC had a 2- 
stage start sequence (create() followed by start()), and in between  
these 2 stages the configuration could have changed.  This doesn't  
apply to Infinispan anymore.

The other reason this was important is to be able to restart a cache,  
after stopping it.  This still applies to Infinispan.  I have  
revisited the code and the reasons for rewiring.  Since there is no  
create phase anymore, we don't need to rewire every time a cache  
starts, only if it had been stopped before.  And as such, a lot fewer  
components need to be marked as @NonVolatile - only a bare minimum  
critical set of components that are needed to bootstrap the starting  
of a cache after it has been stopped.

Also, I have renamed @NonVolatile to @SurvivesRestarts, to be a bit  
more specific about its purpose, and also to break away from the old  
intention of @NonVolatile in JBoss Cache 3.x.  I have updated the  
javadocs of @SurvivesRestarts accordingly as well.

Please have a look, and let me know what you think.

Cheers
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list