Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.Alpha6
    • Component/s: examples
    • Labels:
      None
    • Release Notes Text:
      To try it, use -Dswarm.use.db in the datasource-subsystem example.

      Description

      davidillsley:

      I'm sure its trivial, but I can't find any documentation on how to use a real database eg postgres rather than h2, and my naiive attempts aren't working. An example would be really useful.

      emag:

      I agree with you. For now you can check my example using postgresql.

      https://github.com/emag/wildfly-swarm-tour/tree/master/complete/lifelog-postgresql

      you need to :

      • add module.xml for postgresql jdbc driver like full blown wildfly

      https://github.com/emag/wildfly-swarm-tour/tree/master/complete/lifelog-postgresql/src/main/resources/modules/org/postgresql/main

      • setup Datasource Fraction

      https://github.com/emag/wildfly-swarm-tour/blob/master/complete/lifelog-postgresql/src/main/java/wildflyswarmtour/lifelog/LifeLogContainer.java#L18-L30

      • (option) add setting for resource processing if you define ${version.postgresql} in module.xml

      https://github.com/emag/wildfly-swarm-tour/blob/master/complete/lifelog-postgresql/pom.xml#L68-L73

      I'll do p-r more simple example to this repository later.

      Moved from https://github.com/wildfly-swarm/wildfly-swarm-examples/issues/39

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bob.mcwhirter Bob McWhirter
                Reporter:
                kenfinni Ken Finnigan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: