Skip to content

Commit

Permalink
Merge pull request #329 from /issues/328-wildfly-conf-and-doc
Browse files Browse the repository at this point in the history
Fix #328: Improve WildFly documentation and configuration
  • Loading branch information
banterCZ authored May 2, 2024
2 parents 5b68e6b + f378ccb commit 2f20b9b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 36 deletions.
23 changes: 8 additions & 15 deletions docs/Deploying-Wildfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ Data Adapter contains the following configuration in `jboss-deployment-structure

```
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<exclusions>
<module name="org.apache.xerces" />
<module name="org.apache.xalan" />
</exclusions>
<exclude-subsystems>
<!-- disable the logging subsystem because the application manages its own logging independently -->
<subsystem name="logging" />
</exclude-subsystems>
<resources>
<!-- use WAR provided Bouncy Castle -->
<resource-root path="WEB-INF/lib/bcprov-jdk18on-${BC_VERSION}.jar" use-physical-code-source="true"/>
</resources>
<dependencies>
<module name="com.wultra.powerauth.data-adapter.conf" />
</dependencies>
Expand Down Expand Up @@ -89,12 +80,14 @@ Use the `logback.xml` file to configure logging, for example:

The `application-ext.properties` file is used to override default configuration properties, for example:
```
# Database Configuration
spring.datasource.jndi-name=java:/jdbc/powerauth
powerauth.dataAdapter.service.applicationEnvironment=TEST
```

Data Adapter Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`.
Mind that you should specify `spring.datasource.jndi-name` to use the application server datasource (its declaration is out of the scope of this guideline).
When configure `spring.datasource.url`, the hikari connection pool is used.
Spring Boot running on WildFly or JBoos initializes [JtaTransactionManager](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/jta/JtaTransactionManager.html).

### Bouncy Castle Installation

The Bouncy Castle library for JBoss / Wildfly is included in the Data Adapter war file. The library is configured
using the `jboss-deployment-structure.xml` descriptor. Global module configuration of Bouncy Castle is no longer required.
Data Adapter Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`.
14 changes: 0 additions & 14 deletions powerauth-data-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<webResource>
<directory>src/main/webapp/WEB-INF</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
</webResource>
</webResources>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ logging.config=${POWERAUTH_DATA_ADAPTER_LOGGING:}
# Monitoring
management.tracing.sampling.probability=1.0

spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration
spring.autoconfigure.exclude=\
org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration,\
org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.3">
<deployment>
<exclude-subsystems>
<!-- disable the logging subsystem because the application manages its own logging independently -->
Expand All @@ -10,11 +10,6 @@
<module name="com.wultra.powerauth.data-adapter.conf"/>
</dependencies>

<resources>
<!-- use WAR provided Bouncy Castle -->
<resource-root path="WEB-INF/lib/bcprov-jdk18on-${bcprov-jdk18on.version}.jar" use-physical-code-source="true"/>
</resources>

<local-last value="true"/>
</deployment>
</jboss-deployment-structure>

0 comments on commit 2f20b9b

Please sign in to comment.