Skip to content

Commit

Permalink
Fix #1480: Improve WildFly documentation and configuration (#1486)
Browse files Browse the repository at this point in the history
* Fix #1480: Improve WildFly documentation and configuration

Co-authored-by: Jan Pešek <[email protected]>
  • Loading branch information
banterCZ and jnpsk authored May 2, 2024
1 parent dfba914 commit 99c6cec
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 41 deletions.
2 changes: 1 addition & 1 deletion docs/Admin-Deploying-Wildfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PowerAuth Admin contains the following configuration in `jboss-deployment-struct

```xml
<?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 Down
19 changes: 6 additions & 13 deletions docs/Deploying-Wildfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,13 @@ PowerAuth server contains the following configuration in `jboss-deployment-struc

```xml
<?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.server.conf" />
</dependencies>
Expand Down Expand Up @@ -93,12 +84,14 @@ The `application-ext.properties` file is used to override default configuration

```
# Database Configuration - Oracle
spring.datasource.url=jdbc:oracle:thin:@//[host]:[port]/[servicename]
spring.datasource.username=powerauth
spring.datasource.password=powerauth
spring.datasource.jndi-name=java:/jdbc/powerauth
# Application Service Configuration
powerauth.service.applicationEnvironment=TEST
```

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).

PowerAuth Server Spring application uses the `ext` Spring profile which activates overriding of default properties by `application-ext.properties`.
4 changes: 3 additions & 1 deletion powerauth-admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ management.tracing.sampling.probability=1.0
#management.endpoint.prometheus.enabled=true
#management.prometheus.metrics.export.enabled=true

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 Down
13 changes: 0 additions & 13 deletions powerauth-java-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,6 @@
</excludes>
</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>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,7 @@ management.tracing.sampling.probability=1.0
#management.endpoint.metrics.enabled=true
#management.endpoints.web.exposure.include=health, prometheus
#management.endpoint.prometheus.enabled=true
#management.prometheus.metrics.export.enabled=true
#management.prometheus.metrics.export.enabled=true

spring.autoconfigure.exclude=\
org.springframework.boot.actuate.autoconfigure.metrics.jersey.JerseyServerMetricsAutoConfiguration
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
<?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-${bcprov-jdk18on.version}.jar" use-physical-code-source="true"/>
</resources>

<dependencies>
<module name="com.wultra.powerauth.server.conf" />
</dependencies>
Expand Down

0 comments on commit 99c6cec

Please sign in to comment.