spring-projects / spring-data-r2dbc

Provide support to increase developer productivity in Java when using Reactive Relational Database Connectivity. Uses familiar Spring concepts such as a DatabaseClient for core API usage and lightweight repository style data access.
Apache License 2.0
708 stars 132 forks source link

Manage transaction name when use @Transactional annotatnion #848

Closed soql closed 9 months ago

soql commented 9 months ago

We have problem with r2dbc and mssql project after update spring 2.7 to 3.1. Spring set transaction name to class+method but mssql limit transaction name to 32 chars. Is there any way (interceptor or something else) to catch setting transaction name and override it ?

mp911de commented 9 months ago

There's a bit of discussion at https://github.com/spring-projects/spring-framework/issues/30054.

There's no support to provide a transaction name via @Transactional. However, by configuring a TransactionAnnotationParser you can affect TransactionAttribute that contains the name attribute.

As this is a Spring Framework functionality, I suggest reaching out to the Framework team.