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

2.8. Using Modeshape as the JCR


ModeShape is a Java Content Repository (JCR) that can be used in place of Apache Jackrabbit and has been included as a technical preview in JBoss Enterprise BRMS 5.2 and 5.3.
The following requirements must be met before ModeShape can be installed:
  • The BRMS standalone package has been downloaded and installed, refer to the JBoss Enterprise BRMS Getting Started Guide for further instructions.
  • Apache Ant is installed. Refer to the appendix at the back of this guide for directions.
  • A supported database server is required for production deployment. Refer to https://access.redhat.com/knowledge/articles/119933 for a complete list of supported database servers.
    • The database instance that will be used has already been created.
    • A database user with permissions to change the database exists.
    • The JDBC driver JAR file for the database is in the lib/ directory of the server configuration.

Procedure 2.6. Configure ModeShape

  1. Run the ant installer from the ModeShape directory and specify the server profile ModeShape will be installed to.
    [localhost modeshape]$ ant
    Buildfile: /opt/BRMS/5.3.1/brms-standalone-5.3.1/modeshape/build.xml
    determine_home:
    set-web-home:
    set-as-home:
    set-soa-home:
    init:
         [echo] JBoss Home is ../jboss-as-web
    prompt:
        [input] Enter profile to install ModeShape to:  [default]
    
    Copy to Clipboard Toggle word wrap
  2. Add the user accounts admin and mailman, and assign the roles specified below. The default configuration uses text files to store the usernames, passwords, and assigned roles. The directions here assume that the authorization configuration has not been changed. If it has been changed, then add the users according to that configuration.
    1. Open the file PROFILE/conf/props/brms-users.properties in a text editor and add the users admin and mailman to this file as a new line with the syntax: username=password.
      admin=s3kr3t5
      mailman=53cur3m@1l
      Copy to Clipboard Toggle word wrap
    2. Assign the roles specified below to the two users by opening the PROFILE/conf/props/brms-roles.properties file in a text editor and adding a new line for each user with the syntax username=role1, role2, role3.
      The admin user must be assigned the roles of JBossAdmin, HttpInvoker, user, and admin.
      The mailman user must be assigned the roles of JBossAdmin, readwrite.
      admin=JBossAdmin, HttpInvoker, user, admin
      mailman=JBossAdmin, readwrite
      Copy to Clipboard Toggle word wrap
    3. Optionally, the passwords can be stored in encoded form instead of plain text. To do this run the following command in the application server directory (jboss-as or jboss-as-web) to create the encoded form of the password, replacing PASSWORD with the chosen password.
      [localhost]$ java -cp client/jboss-logging-spi.jar:lib/jbosssx.jar org.jboss.resource.security.SecureIdentityLoginModule PASSWORD
      Encoded password: 5f78dc15b9a559cbdf8592078de921bc
      Copy to Clipboard Toggle word wrap
      Then replace the passwords stored in PROFILE/conf/props/brms-users.properties with the encoded versions.
  3. The default configuration for Modeshape uses a database that is not suitable or supported in production environments. Before deploying into a production environment, this configuration must be changed to a supported database server.
    The default Modeshape repository configuration uses a JNDI data source — ModeShapeBRMSRepo — for data storage which is configured in the PROFILE/deploy/modeshape-brms-store-ds.xml file. Edit this file to change the data source configuration from Hypersonic to the database of your choice. This file is a standard JBoss data source configuration file.
    Refer to the Datasource Configuration chapter of the Application server documentation for details to configure JBoss data sources.
  4. Edit the jboss-brms.war/WEB-INF/components.xml file to remove the Apache Jackrabbit configuration and add the ModeShape configuration.
    To remove the Apache Jackrabbit configuration, comment out the following section:
    <property name="properties">
    <key>org.drools.repository.configurator</key>
    <value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</value>
    <!--  the root directory for the repo storage the directory must exist. -->
    <!--  <key>repository.root.directory</key><value>/opt/yourpath</value>  -->
    </property>
    Copy to Clipboard Toggle word wrap
    The ModeShape configuration is commented out in the default configuration. Uncomment the configuration as shown below:
    <property name="properties">
    <key>org.drools.repository.configurator</key>
    <value>org.drools.repository.modeshape.ModeShapeRepositoryConfigurator</value>
    <key>org.modeshape.jcr.URL</key><value>jndi:jcr/local?repositoryName=jcrrepo</value>
    <key>org.drools.repository.secure.passwords</key><value>false</value>
    <key>org.drools.repository.admin.password</key><value>admin</value>
    <key>org.drools.repository.mailman.password</key><value>mailman</value>
    </property>
    
    Copy to Clipboard Toggle word wrap
  5. ModeShape requires two user accounts to exist, admin and mailman. The passwords for these accounts must be specified in the ModeShape configuration from the previous step.
    <key>org.drools.repository.secure.passwords</key><value>false</value>
    <key>org.drools.repository.admin.password</key><value>password</value>
    <key>org.drools.repository.mailman.password</key><value>password</value>
    Copy to Clipboard Toggle word wrap
  6. Restart the server.

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