jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gadbury <gadb...@googlemail.com>
Subject CacheManager - Cannot Cast BindableRepository to RepositoryImpl
Date Thu, 09 Sep 2010 17:42:38 GMT

Hi all,

I have read the CacheManager article on the Jackrabbit Wiki.  I have also
searched around for a solution.

I am using the following code:

		Repository repository = RepositoryServiceLocator.INSTANCE.getRepository();
		CacheManager manager = ((RepositoryImpl)repository).getCacheManager();
		
		manager.setMaxMemory			(256 * 1024 * 1024); 	// default is 16 * 1024 *
1024
		manager.setMaxMemoryPerCache	(64 * 1024 * 1024); 	// default is 4 * 1024 *
1024
		manager.setMinMemoryPerCache	(1 * 1024 * 1024); 		// default is 128 *
1024]

I am getting the exception:

java.lang.ClassCastException:
org.apache.jackrabbit.core.jndi.BindableRepository cannot be cast to
org.apache.jackrabbit.core.RepositoryImpl

How else can I get the CacheManager?

James
-- 
View this message in context: http://jackrabbit.510166.n4.nabble.com/CacheManager-Cannot-Cast-BindableRepository-to-RepositoryImpl-tp2533300p2533300.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message