[hibernate-dev] [infinispan-dev] [HibernateSearch] Infinispan programmatic configuration

Manik Surtani manik at jboss.org
Mon Sep 7 12:31:01 EDT 2009


On 3 Sep 2009, at 22:34, Łukasz Moreń wrote:

>
> I am thinking how to provide programmatic configuration into  
> Hibernate Search for many caches, i.e. if user wants to use  
> different configured caches for each index.
> With XML it is ok, in one file can be configured many named caches.  
> So far in programmatic version user have to implement method that  
> returns Configuration object - only one configuration can be  
> provided that way.
> To achieve this same what in XML case, method should return  
> something like: List<{cacheName}, {configuration}>. It is quite  
> painfull, but on the other hand just extra feature. Some other ideas?

Yeah, it is clunky.  Perhaps another option is for HS to request the  
appropriate configuration?  E.g., instead of just:

	Configuration getConfiguration();

Your interface could also have:

	Configuration getConfiguration(String indexName);

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








More information about the hibernate-dev mailing list