Skip to content

Support for Microsoft SQL Server in JDBC event publication registry #804

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

Closed
davidkarlsen opened this issue Sep 8, 2024 · 4 comments
Closed
Assignees
Labels
in: event publication registry Event publication registry type: improvement Minor improvements
Milestone

Comments

@davidkarlsen
Copy link

SQL-server isn't a supported database type as of today:

Caused by: java.lang.IllegalArgumentException: Unsupported database type: Microsoft SQL Server
	at org.springframework.modulith.events.jdbc.DatabaseType.lambda$from$1(DatabaseType.java:54)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at org.springframework.modulith.events.jdbc.DatabaseType.from(DatabaseType.java:54)
	at org.springframework.modulith.events.jdbc.JdbcEventPublicationAutoConfiguration.databaseType(JdbcEventPublicationAutoConfiguration.java:45)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:146)
	... 42 more

implement support for this.

@odrotbohm
Copy link
Member

That's a reasonable suggestion. I've tried to get a Testcontainers setup working for an hour now and failed to get a MSSQL server instance boot on my M1 Mac properly via Docker. If anyone was willing to contribute such a setup (create a application-mssql.properties with the necessary and augment, for example, DatabaseSchemaInitializerIntegrationTests with an MSSQL-specific execution) I am happy to take another look.

@odrotbohm odrotbohm added in: event publication registry Event publication registry meta: waiting for feedback Waiting for feedback of the original reporter labels Sep 9, 2024
@davidkarlsen
Copy link
Author

We'll get back with a PR (and perhaps questions)

@davidkarlsen
Copy link
Author

@odrotbohm PTAL

odrotbohm pushed a commit that referenced this issue Sep 11, 2024
odrotbohm added a commit that referenced this issue Sep 11, 2024
Actively reject attempts to use a dedicated schema with SQL Server. Prevent schema reset being executed if no schema is used. Properly report exception during database name detection.

Original pull request: GH-808.
@odrotbohm odrotbohm added this to the 1.3 M3 milestone Sep 11, 2024
@odrotbohm odrotbohm added type: improvement Minor improvements and removed meta: waiting for feedback Waiting for feedback of the original reporter labels Sep 11, 2024
@odrotbohm odrotbohm changed the title Support MSSQL DatabaseType Support schema initialization for Microsoft SQL Server Sep 11, 2024
@odrotbohm
Copy link
Member

That's polished and merged! Thanks for the contribution!

@odrotbohm odrotbohm self-assigned this Sep 12, 2024
@odrotbohm odrotbohm changed the title Support schema initialization for Microsoft SQL Server Support for Microsoft SQL Server in JDBC event publication registry Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: event publication registry Event publication registry type: improvement Minor improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants