Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 4. Persistence Setups


4.1. Configuring Persistence for Business Central

Red Hat JBoss BPM Suite is configured to use an example data source with Java Naming and Directory Interface (JNDI) name java:jboss/datasources/ExampleDS. The example data source is not suitable for production.

To change the data source:

  1. Prepare your database:

    1. Go to the Product Downloads on the Customer Portal and select Red Hat JBoss BPM Suite.
    2. Download Red Hat JBoss BPM Suite 6.3.0 Supplementary Tools.
    3. Unzip jboss-brms-bpmsuite-6.3-supplementary-tools/ddl-scripts, for example into /tmp/ddl.
    4. Import the DDL script for your database into the database you want to use, for example:

      psql jbpm < /tmp/ddl/postgresql/postgresql-jbpm-schema.sql
      Copy to Clipboard Toggle word wrap
  2. Install the Java Database Connectivity (JDBC) driver onto your application plaform. For example, to deploy a PostgreSQL JDBC driver:

    1. Copy your JDBC jar file into EAP_HOME/modules/org/postgres/main/.
    2. Create EAP_HOME/modules/org/postgres/main/module.xml with the following content:

      <?xml version="1.0" ?>
      <module xmlns="urn:jboss:module:1.1" name="org.postgres">
          <resources>
              <!-- Change the name of the JDBC driver to match yours. -->
              <resource-root path="postgresql-9.4-1202.jdbc42.jar"/>
          </resources>
          <dependencies>
              <module name="javax.api"/>
              <module name="javax.transaction.api"/>
          </dependencies>
      Copy to Clipboard Toggle word wrap

      For further information about deploying JDBC drivers, see Install a JDBC Driver as a Core Module of the Red Hat JBoss Enterprise Application Platform Administration and Configuration Guide.

  3. Create a new data source:

    1. Open EAP_HOME/standalone/configuration/standalone.xml and locate <datasources>.
    2. Add your data source and the driver:

      <!-- Default data source not suitable for production, now disabled. -->
      <datasources>
          <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="false" use-java-context="true">
              <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
              <driver>h2</driver>
              <security>
                  <user-name>sa</user-name>
                  <password>sa</password>
              </security>
          </datasource>
      
          <!-- The new data source configuration. -->
          <datasource jndi-name="java:jboss/datasources/PostgresqlDS" pool-name="PostgresqlDS" enabled="true">
              <connection-url>jdbc:postgresql://localhost:5432/jbpm</connection-url>
              <driver>postgresql-9.4-1202.jdbc42.jar</driver>
              <security>
                  <user-name>jbpm</user-name>
                  <password>jbpm</password>
              </security>
          </datasource>
      
          <!-- The drivers section. -->
          <drivers>
              <driver name="h2" module="com.h2database.h2">
                  <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
              </driver>
              <!-- Register your new driver. -->
              <driver name="postgres" module="org.postgres">
                  <driver-class>org.postgresql.Driver</driver-class>
              </driver>
          </drivers>
      </datasources>
      Copy to Clipboard Toggle word wrap

      For more information, see Example PostgreSQL Datasource of the Red Hat JBoss Enterprise Application Platform Administration and Configuration Guide.

  4. Register the data source in Business Central:

    1. Open EAP_HOME/standalone/deployments/business-central.war/WEB-INF/classes/META-INF/persistence.xml.
    2. Locate the <jta-data-source> tag and change it to the JNDI name of your data source, for example:

      <jta-data-source>java:jboss/datasources/PostgresqlDS</jta-data-source>
      Copy to Clipboard Toggle word wrap
    3. Locate the <properties> tag and change the hibernate.dialect property, for example:

      <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
      Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat