2012-03-22 2 views
1

Я пытаюсь реализовать кеш второго уровня Nhibernate с использованием NHibernate.Caches.Velocity и обсудил here on stack overflow с использованием этого this blog post.Как решить «Эта операция не поддерживается кешем». для кеша NHibernate в Azure?

Приложение Azure WebRole использует Nhibernate 3.2.

Все кажется правильным для исключения, которые бросают при инициализации Завод сеанса, кроме:

"This operation is not supported by the cache." 

Стек след:

at Microsoft.ApplicationServer.Caching.DataCacheFactory.ThrowNotSupportedException() 
    at Microsoft.ApplicationServer.Caching.DataCacheFactory.CreateHybridClient(String cacheName, NamedCacheConfiguration config, SimpleSendReceiveModule sendRcvModule) 
    at Microsoft.ApplicationServer.Caching.DataCacheFactory.CreateNewCacheClient(DataCacheDeploymentMode mode, String cacheName, NamedCacheConfiguration config, SimpleSendReceiveModule sendRcvModule) 
    at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName) 
    at NHibernate.Caches.AppFabric.AppFabricCacheFactory.GetCache(String cacheName, Boolean useDefault) 
    at NHibernate.Caches.AppFabric.AppFabricCacheAdapter..ctor(String regionName) 
    at NHibernate.Caches.AppFabric.Adapters.AppFabricCacheNamedAdapter..ctor(String regionName) 
    at NHibernate.Caches.AppFabric.AppFabricCacheAdapterFactory.Create(String regionName) 
    at NHibernate.Caches.AppFabric.AppFabricProvider.BuildCache(String regionName, IDictionary`2 properties) 
    at NHibernate.Cache.UpdateTimestampsCache..ctor(Settings settings, IDictionary`2 props) 
    at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) 
    at NHibernate.Cfg.Configuration.BuildSessionFactory() 
    at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() in d:\Builds\FluentNH\src\FluentNHibernate\Cfg\FluentConfiguration.cs:line 230 

Web.Config:

<dataCacheClients> 
    <dataCacheClient name="default"> 
     <hosts> 
     <host name="xxx.cache.windows.net" cachePort="22233" /> 
     </hosts> 
     <securityProperties mode="Message"> 
     <messageSecurity 
      authorizationInfo="xxx"> 
     </messageSecurity> 
     </securityProperties> 
    </dataCacheClient> 
    </dataCacheClients> 

Кто-нибудь знает, что вызывает это? Я получаю нулевые релевантные результаты, если я это сделаю.

ответ

0

Я не могу сказать точно, поскольку я не знаком с тем, как NHibernate пытается использовать кеш, но Azure Caching не поддерживает все функциональные возможности кеша помещения. Я предполагаю, что он пытается использовать неподдерживаемые функции. MS имеют list of the differences between the two

+0

Спасибо. Похоже, что нет другой очевидной причины. –