-
Notifications
You must be signed in to change notification settings - Fork 41.2k
XADataSourceAutoConfiguration is difficult to use with DB2XADataSource as it does not have a URL property #20229
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
Comments
Thanks for the report. To make sure that we fully understand the problem, I'd like to know a bit more about the |
This sample does not use an embedded db (not really suitable as DB2 replacement). It is a similar test setup as the one we use. The 2 tests show the Creating this example I found out that |
Thanks for the sample. I can see now that spring:
datasource:
xa:
data-source-class-name:
com.ibm.db2.jcc.DB2XADataSource
properties:
allowNextOnExhaustedResultSet: 1
databaseName: whereAreYou
driverType: 4
password: It is I, Leclerc
portNumber: 5000
serverName: localhost
user: AlloAllo |
I've marked this as a bug to be fixed in 2.2.x for now at least. We'll have to see what's possible within the constraints of a maintenance release. If necessary, we may need to defer this to 2.3 where would could afford to make more extensive changes. |
Spring Boot version: all
When using an
XADataSource
which has no propertyurl
to be set, theXADataSourceAutoConfiguration
will always do source.put("url", this.properties.determineUrl()); which fails when no url is provided.Since there is no
url
property to be set on theXADataSource
we use and all required configuration properties are already located in theDataSourceProperties.Xa#getProperties
I don't see why this should fail. For a simpleDataSource
build bydataSourceProperties().initializeDataSourceBuilder().build()
it is valid to fail because it depends on theurl
.I would prefer to have a method which is able to return
null
likeDataSourceProperties#determineUsername
andDataSourceProperties#determinePassword
to be used in theXADataSourceAutoConfiguration
. Now with propertyspring.datasource.url=just to be able to start
we are able to start, although that property is not used for theXADataSource
The text was updated successfully, but these errors were encountered: