Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21346

Missing documentation for Externalize HTTP Sessions to a relational database

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.4.0.Beta
    • Clustering, Documentation
    • None
    • 3
    • False
    • False
    • Undefined

      Looking in CHAPTER 24. CONFIGURING HIGH AVAILABILITY we can find "24.3.9. Externalize HTTP Sessions to Red Hat Data Grid";

      We should add an analogous paragraph on how-to 24.3.9. Externalize HTTP Sessions to a relational database;

      We support the following databases on JBoss EAP:

      • db2
      • mariadb/mariadb_galera
      • mssql
      • mysql
      • oracle RAC
      • sybase
      • postgresql/postgresplus

      we could add an example for e.g. postgresql;

      In clustering tests we use the following configuration:

      # add datasource
      data-source add --name=testDS --jndi-name=java:jboss/datasources/testDS --driver-name=postgresql-connector.jar --connection-url=jdbc:postgresql://<HOST>:<PORT>/<DB> --enabled=true --jta=true --use-java-context=true --transaction-isolation=TRANSACTION_READ_COMMITTED --min-pool-size=1 --max-pool-size=5 --pool-prefill=true --user-name=<USERNAME> --password=<PASSWORD> --prepared-statements-cache-size=32 --share-prepared-statements=true
      
      # create a new cache named "offload" with a "store=jdbc" connected to the datasource
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload:add()
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc:add(data-source=testDS,fetch-state=false,passivation=false,purge=false,shared=true,dialect=POSTGRES){allow-resource-service-restart=true}
      
      # make the new "offload" cache the default for storing "web" sessions
      /subsystem=infinispan/cache-container=web:write-attribute(name=default-cache, value=offload)
      
      # configure specific properties for the database vendor (postgres in this case)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=id-column.name,value=id)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=data-column.name,value=datum)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=timestamp-column.name,value=version)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=id-column.type,value=VARCHAR(255))
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=timestamp-column.type,value=BIGINT)
      /subsystem=infinispan/cache-container=web/invalidation-cache=offload/store=jdbc/table=string:write-attribute(name=data-column.type,value=BYTEA)
      

            Unassigned Unassigned
            tborgato@redhat.com Tommaso Borgato
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: