-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[WFLY-19790] Remove batch-processing DS file #960
Conversation
29e31c5
to
626cce3
Compare
@jfdenise I don't know how to fix this error: As the |
Besides the script change, guess we need instructions wrt the script execution when used with bare-metal standard distribution, and a config restore script too? You can reuse content from quickstart/ee-security/README-source.adoc Line 40 in 484ba35
|
Btw I really thought you would just need to update the persistence.xml, ie no need for config change script... |
@emmartins Thanks for checking this PR! I discussed this issue with @jamezp, and the DS file may still be used in the future, so I am holding off on this work. |
I do understand the log message is a bit annoying and really we should have a look at that. There are quite a few comments on https://issues.redhat.com/browse/WFLY-4296 as to why this support should not be removed. The problem is there is no good way to create a test data source without the One option is to simply use the default data source, however I'm not sure if we purposely do not do that in Quickstarts for a reason. |
btw here is one blog post that I'm writing on this topic: wildfly/wildfly.org#677 If this is a better solution for this example, I can work on it. |
really up to you guys what you want to use as datasource, be it standard or not I'm fine with it, just agree with QE it's no longer ok to use a -ds file to config a database, you now have the standard persistence.xml and DatasourceDefinition annotation that should be the alternative, or at least the first alternative, if the vendor requires something more (like a cli script) then be it |
@emmartins Thanks for the comment! According to all your opinions, I'd prefer to use the CLI script to do this. James has provided an example showing the CLI usage here: jberet/jberet-examples#13 I'll use the above example as a reference and update the PR. |
@emmartins I have replaced Glow with the data source feature pack in combination with the CLI script to create the database and configure the datasource. Could you please check if this solution is acceptable? Thanks! |
@jamezp I'm not sure how to fix the Kubernetes CI test failure. Could you please help to check it when you have time? Thanks! |
@liweinan I have no idea why the Kubernetes tests are failing. There seems to be no indication as to why. |
@@ -200,12 +203,32 @@ | |||
<groupId>org.wildfly.plugins</groupId> | |||
<artifactId>wildfly-maven-plugin</artifactId> | |||
<configuration> | |||
<discover-provisioning-info> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we going back to directly using galleon layers, instead of glow's discovery? This seems a mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you are just doing copy paste of outdated (in the sense of not using glow) configuration? You can use glow and pack a script. In short the only change you do here is to add
<packaging-scripts>
<packaging-script>
<scripts>
<script>${configure.ds.script}</script>
</scripts>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</packaging-script>
</packaging-scripts>
@@ -0,0 +1 @@ | |||
xa-data-source add --name=batch_db --enabled=true --use-java-context=true --use-ccm=true --jndi-name=java:jboss/datasources/batch-processingDS --xa-datasource-properties={"URL"=>"jdbc:h2:mem:batch-processing;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1"} --driver-name=h2 --password=sa --user-name=sa --same-rm-override=false --no-recovery=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think you could do this op using only Jakarta specs, which would make this app portable among vendors. But I tried to use a DataSourceDefinition like the one below (you can add this for instance to Contact class) but first Glow complained and required me to prevent fail on error, and then boot failed with a CNFE for org.h2.jdbcx.JdbcDataSource. I guess we can try to explore the specs way and clarify how should users use the specs DataSourceDefinition later...
@DataSourceDefinition(name="java:jboss/datasources/batch-processingDS",
className="org.h2.jdbcx.JdbcDataSource",
url="jdbc:h2:mem:batch-processing;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1",
user="sa",
password="sa"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, I was able to make it work, I will send an alternative PR for you to have a look
<addOn>h2-database:default</addOn> | ||
</addOns> | ||
</discover-provisioning-info> | ||
<feature-packs> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should revert this change too, other than adding the script of course
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments
@emmartins Thanks for the review! I'll check it.
Cool! I'll see if this can work with this example. |
I closed this PR because it's been replaced by the PR mentioned above. |
Issue: https://issues.redhat.com/browse/WFLY-19790