Skip to content

Commit

Permalink
WFLY-19790 Remove batch-processing DS file
Browse files Browse the repository at this point in the history
  • Loading branch information
liweinan committed Sep 30, 2024
1 parent 769134f commit 626cce3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 40 deletions.
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


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
2 changes: 0 additions & 2 deletions batch-processing/src/main/resources/META-INF/persistence.xml
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.

0 comments on commit 626cce3

Please sign in to comment.