Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions batch-processing/configure-server.cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Batch script to configure the datasource
batch

# Start by creating the JDBC datasource
/subsystem=datasources/data-source=batch-processingDS:add(connection-url="jdbc:h2:mem:batch-processingDS;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1", jndi-name="java:jboss/datasources/batch-processingDS", driver-name=h2, user-name="sa", password="sa", enabled="true", use-java-context=true)
/subsystem=batch-jberet/jdbc-job-repository=jdbc:add(data-source=batch-processingDS)
/subsystem=batch-jberet:write-attribute(name=default-job-repository,value=jdbc)

# Run the batch commands
run-batch

# Reload the server configuration
#reload
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the reload since that has troubles when executed in server provisioning

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can create another PR to do this if necessary.



18 changes: 18 additions & 0 deletions batch-processing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@
application is deployed in the root web context.
-->
<name>ROOT.war</name>
<packaging-scripts>
<packaging-script>
<scripts>
<script>${basedir}/configure-server.cli</script>
</scripts>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</packaging-script>
</packaging-scripts>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -241,6 +250,15 @@
application is deployed in the root web context. Add ROOT.war to the server.
-->
<filename>ROOT.war</filename>
<packaging-scripts>
<packaging-script>
<scripts>
<script>${basedir}/configure-server.cli</script>
</scripts>
<!-- Expressions resolved during server execution -->
<resolve-expressions>false</resolve-expressions>
</packaging-script>
</packaging-scripts>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
<persistence-unit name="primary" transaction-type="JTA">
<!-- If you are running in a production environment, add a managed
data source, this example data source is just for development and testing! -->
<!-- The datasource is deployed as WEB-INF/jboss-batch-processing-ds.xml, you
can find it in the source at src/main/webapp/WEB-INF/jboss-batch-processing-ds.xml -->
<jta-data-source>java:jboss/datasources/batch-processingDS</jta-data-source>
<properties>
<!-- Properties for Hibernate -->
Expand Down

This file was deleted.

Loading