[SPR-17464] Remove java.sql dependencies from ReflectionUtils and TransactionDefinition Created: 04/Nov/18  Updated: 15/Jan/19

Status: Open
Project: Spring Framework
Component/s: Core, Transaction
Affects Version/s: None
Fix Version/s: 5.2 RC1

Type: Task Priority: Major
Reporter: Juergen Hoeller Assignee: Juergen Hoeller
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is related to SPR-17618 Allow reuse of database error code tr... Open
Days since last comment: 1 year, 25 weeks, 4 days ago
Last commented by a User: true
Last updater: Spring Issuemaster


ReflectionUtils provides a helper for JDBC method invocations that throw java.sql.SQLException, and TransactionDefinition derives its transaction constants from java.sql.Connection. Both of those can easily be avoided in order to allow spring-core and the transaction abstraction in spring-tx to be usable on JDK 9+ images without the java.sql module present.

Comment by Dimitrios Liapis [ 04/Nov/18 ]

Juergen Hoeller I could take a look at this if no-one has picked it up already.

How are we planning to replace these two invokeJdbcMethod methods? Removing them on a non-major release would break backwards compatibility, no?

Comment by Juergen Hoeller [ 05/Nov/18 ]

Dimitrios Liapis, I've prepared the first step here already: deprecating ReflectionUtils.invokeJdbcMethod in 5.1.3 and 5.0.11, ultimately removing it in 5.2. Since we're only really using it internally in WebSphereDataSourceAdapter, I've simply moved the corresponding code to a private method there.

Thanks for volunteering, in any case!

Comment by Dimitrios Liapis [ 05/Nov/18 ]

Juergen Hoeller thanks for the details explanation.

Comment by Spring Issuemaster [ 14/Jan/19 ]

The Spring Framework has migrated to GitHub Issues. Please visit spring-projects/spring-framework#21996 for further activity, or to subscribe to receive notifications.

Generated at Sat Jul 11 05:56:43 UTC 2020 using Jira 8.5.4#805004-sha1:0444eab799707f9ad7b248d69f858774aadfd250.