JBoss EAP 7.2 notes

  1. how I installed PostgreSQL JDBC driver in JBoss EAP 7 (June 2021)
  2. provenance

    1. Download the Postgres Driver which you need as .jar-file (http://jdbc.postgresql.org/download.html)
    2. Go to JBoss directory and find modules\org folder. Create two new folders, so you get modules\org\postgresql\main and insert the .jar file there.
    3. Create in the same folder a file named module.xml with the content (set in <resource-root path="" > the name of your .jar-file):
    4. <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.0" name="org.postgresql">
       <resources>
       <resource-root path="postgresql-Y.X-Z.jdbcV.jar"/>
       </resources>
       <dependencies>
       <module name="javax.api"/>
       <module name="javax.transaction.api"/>
       </dependencies>
      </module> 
    5. Edit your standalone.xml and add the following code between the tags <datasources>>drivers<
    6. <driver name=”postgresql” module=”org.postgresql”>
           <xa-datasource-class> org.postgresql.xa.PGXADataSource </xa-datasource-class>
      </driver>
                  
    7. Now start the server and check wether he is loading the driver. The console should show something like: INFO [org.jboss.as.connector.subsystems.datasources] JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 8.4). If it nothing showing about your Postgres Driver, check the spelling and the coding (e.g. the quotation marks can be in different code and dont work, can happen if you just copy and paste). Fix this before going on.
    8. Go to your standalone.xml and set between following code (set your connection-url, usename and password, jndi-name can also be java:/postgresDS, you can do this step through admin console of the server as well):
    9. <datasource jndi-name="java:jboss/postgresDS" pool-name="postgresDS" enabled="true" jta="false" use-java-context="true" use-ccm="false">
      <connection-url>
       jdbc:postgresql://192.z.y.x:5432/yourdatabase
       </connection-url>
       <driver-class>
       org.postgresql.Driver
       </driver-class>
       <driver>
       postgresql
       </driver>
       <pool>
       <min-pool-size> 2 </min-pool-size>
       <max-pool-size> 20 </max-pool-size>
       </pool>
       <security>
       <user-name> urusername </user-name>
       <password> urpasswort </password>
       </security>
       <validation>
       <validate-on-match> false </validate-on-match>
       <background-validation> false </background-validation>
       <background-validation-millis> 0 </background-validation-millis>
       </validation>
       <statement>
       <prepared-statement-cache-size>
       0
       </prepared-statement-cache-size>
       <share-prepared-statements>
       false
       </share-prepared-statements>
       </statement>
       </datasource>
                    

  3. how I installed my own SSL certificate in JBoss EAP 7
  4. I generated a keystore file mperdikeas-jboss-server.jks using this Makefile and then changed the <security-realm> element in the JBoss configuration file as shown in this XML fragment

    See also commit 7fe163a in the git repository at: ~/EAP-7.1.0/jboss-eap-7.1/standalone/configuration

  5. how to configure automatic redirects from http to https
  6. https://stackoverflow.com/a/56549496/274677

  7. correspondance between JBoss EAP and WildFly versions
  8. JBoss EAP Version WildFly Version
    JBoss EAP 7.2 WildFly 14.0.1
    JBoss EAP 7.1 WildFly 11
    JBoss EAP 7.0 WildFly 10
    JBoss EAP 6.4 JBoss AS 7.5
    JBoss EAP 6.3 JBoss AS 7.4
    JBoss EAP 6.2 JBoss AS 7.3
    JBoss EAP 6.1 JBoss AS 7.2
    JBoss EAP 6.0 JBoss AS 7.1