Skip to content

Commit 20375e9

Browse files
committed
[WFLY-19790] Replaces -ds.xml deprecated filed with Jakarta's DataSourceDefinition
1 parent de97aa6 commit 20375e9

4 files changed

Lines changed: 25 additions & 52 deletions

File tree

batch-processing/pom.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,19 @@
191191
</plugin>
192192
</plugins>
193193
</pluginManagement>
194+
<plugins>
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-war-plugin</artifactId>
198+
<configuration>
199+
<archive>
200+
<manifestEntries>
201+
<Dependencies>com.h2database.h2</Dependencies>
202+
</manifestEntries>
203+
</archive>
204+
</configuration>
205+
</plugin>
206+
</plugins>
194207
</build>
195208

196209
<profiles>
@@ -205,8 +218,9 @@
205218
<discover-provisioning-info>
206219
<version>${version.server}</version>
207220
<addOns>
208-
<addOn>h2-database:default</addOn>
221+
<addOn>h2-database</addOn>
209222
</addOns>
223+
<failsOnError>false</failsOnError>
210224
</discover-provisioning-info>
211225
</configuration>
212226
<executions>
@@ -232,8 +246,9 @@
232246
<version>${version.server}</version>
233247
<context>cloud</context>
234248
<addOns>
235-
<addOn>h2-database:default</addOn>
249+
<addOn>h2-database</addOn>
236250
</addOns>
251+
<failsOnError>false</failsOnError>
237252
</discover-provisioning-info>
238253
</configuration>
239254
<executions>

batch-processing/src/main/java/org/jboss/as/quickstarts/batch/model/Contact.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@
1616
*/
1717
package org.jboss.as.quickstarts.batch.model;
1818

19+
import jakarta.annotation.sql.DataSourceDefinition;
1920
import jakarta.persistence.Column;
2021
import jakarta.persistence.Entity;
2122
import jakarta.persistence.Id;
2223
import jakarta.validation.constraints.NotNull;
2324

25+
2426
@Entity
27+
@DataSourceDefinition(name="java:jboss/datasources/batch-processingDS",
28+
className="org.h2.jdbcx.JdbcDataSource",
29+
url="jdbc:h2:mem:batch-processing;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1",
30+
user="sa",
31+
password="sa"
32+
)
2533
public class Contact {
2634

2735
@Id

batch-processing/src/main/webapp/WEB-INF/jboss-batch-processing-ds.xml

Lines changed: 0 additions & 38 deletions
This file was deleted.

bmt/README-source.adoc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The `bmt` quickstart demonstrates Bean-Managed Transactions (BMT), showing how t
1212
:standalone-server-type: default
1313
:archiveType: war
1414
:uses-h2:
15-
:uses-ds-xml:
1615
:performance-scalability:
1716

1817
== What is it?
@@ -53,17 +52,6 @@ You are presented with a simple form for adding key/value pairs, and a checkbox
5352
. To add or update the value of a key, fill in the *Key* and *Value* input fields.
5453
. Click the *Submit* button to see the results.
5554

56-
== Server Log: Expected Warnings and Errors
57-
58-
You will see the following warnings in the server log. You can ignore these warnings.
59-
60-
[source,options="nowrap"]
61-
----
62-
WFLYJCA0091: -ds.xml file deployments are deprecated. Support may be removed in a future version.
63-
64-
HHH000431: Unable to determine H2 database version, certain features may not work
65-
----
66-
6755
// Server Distribution Testing
6856
include::../shared-doc/run-integration-tests-with-server-distribution.adoc[leveloffset=+1]
6957
// Undeploy the Quickstart

0 commit comments

Comments
 (0)