public void Persistence() { Configure configure = Configure.With(); #region 4to5ConfigurePersistence // Configure to use InMemory configure.InMemorySagaPersister(); configure.UseInMemoryTimeoutPersister(); configure.InMemorySubscriptionStorage(); configure.RunGatewayWithInMemoryPersistence(); configure.UseInMemoryGatewayDeduplication(); // Configure to use NHibernate configure.UseNHibernateSagaPersister(); configure.UseNHibernateTimeoutPersister(); configure.UseNHibernateSubscriptionPersister(); configure.UseNHibernateGatewayPersister(); configure.UseNHibernateGatewayDeduplication(); // Configure to use RavenDB for everything configure.RavenPersistence(); // Configure to use RavenDB configure.RavenSagaPersister(); configure.UseRavenTimeoutPersister(); configure.RavenSubscriptionStorage(); configure.RunGatewayWithRavenPersistence(); configure.UseNHibernateGatewayDeduplication(); #endregion }
CustomRavenConfig(Configure configure) { #region OldRavenDBPersistenceInitialization configure.RavenPersistence(); configure.RavenSagaPersister(); configure.RavenSubscriptionStorage(); configure.UseRavenTimeoutPersister(); configure.UseRavenGatewayDeduplication(); configure.UseRavenGatewayPersister(); #endregion #region Version2_5RavenDBPersistenceInitialization // Need to call this method configure.RavenDBStorage(); // Call this method to use Raven saga storage configure.UseRavenDBSagaStorage(); // Call this method to use Raven subscription storage configure.UseRavenDBSubscriptionStorage(); // Call this method to use Raven timeout storage configure.UseRavenDBTimeoutStorage(); // Call this method to use Raven deduplication storage for the Gateway configure.UseRavenDBGatewayDeduplicationStorage(); // Call this method to use the Raven Gateway storage method configure.UseRavenDBGatewayStorage(); #endregion }
public static Configure DefineTimeoutPersister(this Configure config, string persister) { if (string.IsNullOrEmpty(persister)) { persister = TimeoutPersisters.Default.Settings["TimeoutPersister"]; } if (persister.Contains(typeof(InMemoryTimeoutPersistence).FullName)) { return(config.UseInMemoryTimeoutPersister()); } if (persister.Contains(typeof(RavenTimeoutPersistence).FullName)) { config.RavenPersistence(() => "url=http://localhost:8080"); return(config.UseRavenTimeoutPersister()); } CallConfigureForPersister(config, persister); return(config); }