Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NHibernateStorageSession assumes saga connectionstring #286

Open
dvdstelt opened this issue May 3, 2017 · 1 comment
Open

NHibernateStorageSession assumes saga connectionstring #286

dvdstelt opened this issue May 3, 2017 · 1 comment

Comments

@dvdstelt
Copy link
Member

dvdstelt commented May 3, 2017

Together @HEskandari , I investigated an issue related to this StackOverflow issue and came to the following conclusion:

Issue description

When you try to disable sagas and subscriptions, are left with just timeouts and provide a connectionstring for just timeouts, the persister complains about saga connectionstring not being found.

Detailed description

The NHibernatePersistence feature tries to enable timeouts, sagas, subscriptions, etc. by default. However line 21 enables NHibernateStorageSession and this is looking for a specific saga connectionstring in line 35.

When just providing the connectionstring for the timeout, after disabling everything else, it complains about a missing saga connectionstring.

        endpointConfiguration.DisableFeature<MessageDrivenSubscriptions>();
        endpointConfiguration.DisableFeature<Sagas>();
        endpointConfiguration.UsePersistence<NHibernatePersistence, StorageType.Timeouts>();

and configuration

<add name="NServiceBus/Persistence/NHibernate/Timeout" connectionString="server=.\sqlexpress;database=nservicebus; Trusted_Connection=True;" />

Workaround

Disabling the feature NHibernateStorageSession like this

        endpointConfiguration.DisableFeature<NHibernateStorageSession>();
        endpointConfiguration.DisableFeature<MessageDrivenSubscriptions>();
        endpointConfiguration.DisableFeature<Sagas>();
        endpointConfiguration.UsePersistence<NHibernatePersistence, StorageType.Timeouts>();

Suggested solution

Easiest solution is probably to make sure NHibernateStorageSession doesn't require the saga connectionstring. Maybe just have "Saga" empty in line 35. That would also require to fix the error message, since it might not have a suffix at all.

@tmasternak tmasternak added the Bug label May 29, 2017
@tmasternak
Copy link
Member

I don't think we should tackle it right now. We have a workaround and a single client that had issues with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants