-
Notifications
You must be signed in to change notification settings - Fork 68
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
Should @DataSourceDefinition be validated by the Jakarta EE 11 Platform TCK? #907
Comments
I'm confused by this. On the one hand, it will be hard to test, but on the other hand it seems it's already tested for EE 10. So I'm not sure how to weigh this 'hard to test' factor. On the general point I don't see the 'we do not recommend' wording as a reason to drop testing of DataSourceDefinition altogether. It's an EE feature that's used. From a purely WildFly/EAP standpoint, we support using secure expressions as annotation attribute values, so the username/password need not be in the code, so it's possible to securely use this feature. |
Copying an example DataSourceDefinition from https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/appclient/deploy/metadatacomplete/testapp/files/TestAppClient.java.src#L49:
The above fragment is from an Jakarta EE 10 Platform TCK source file named So, it would be easy for the EE 11 Platform TCK to provide a test source project that users can build + run after updating the @DataSourceDefinition with database connectivity information that will work for them. There are likely other (easy) ways to test @DataSourceDefinition.
Agreed as over the years, there has been a lot of passion about keeping |
It is better to support standard EL in these attributes across multiple application servers. Currently, Payara and WildFly use their format for attribute EL configuration. |
I filed an issue on common-annotations before, check here: jakartaee/common-annotations-api#95, but no plan for this. |
Thanks @bstansberry @hantsy for the feedback! From the discussion here I see interest in using expressions in @DataSourceDefinition(s) in Jakarta EE 11 application source code. If/when that becomes a feature for Jakarta EE , that would need to be tested via a Platform TCK test that all EE implementations must pass.
No one responded that the answer is no, so I think by default the answer is yes.
Lets keep this issue open a bit longer to see if we get additional feedback.
I think the simplest @DataSourceDefinition TCK test would be to specify a JDBC driver class that mocks a JDBC driver, perhaps something like:
|
+1 on adding some tests |
There are tests. Searching the current platform-tck tckrefactor branch shows the following usage:
|
As per https://jakarta.ee/specifications/platform/10/jakarta-platform-spec-10.0#a1688 regarding DataSourceDefinition use in production:
Should the
@DataSourceDefinition
feature be validated by the Jakarta EE 11 Platform TCK?If no, we should remove
@DataSourceDefinition
testing from the EE 11 Platform TCK.If yes, that may be hard to test since the test source that contains the @DataSourceDefinition must be recompiled after the test source is updated to include database server connectivity information. In EE 10, we do recompile the test source after it is updated to include database passwords and other database server connectivity information.
The text was updated successfully, but these errors were encountered: