Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagehtml/xml
titlestandalone.xml
<subsystem xmlns="urn:jboss:domain:security:1.2">
    <security-domains>
        <security-domain name="magnolia" cache-type="default">
           <authentication>
              <login-module code="info.magnolia.jaas.sp.jcr.JCRAuthenticationModule" flag = "requisite" />
              <login-module code="info.magnolia.jaas.sp.jcr.JCRAuthorizationModule" flag = "required" />
           </authentication>
        </security-domain>
        <security-domain name="Jackrabbit" cache-type="default">
           <authentication>
              <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag = "required" />
           </authentication>
        </security-domain>
        <security-domain name="other" cache-type="default">
            <authentication>
                <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag="required"/>
            </authentication>
        </security-domain>
    </security-domains>
</subsystem>

Magnolia Workflow

When using Magnolia's worklow modules you might experience class loading issue related to packages of org.jboss.weld.*. In this case create or edit jboss-deployment-structure.xml file in Magnolia's WEB-INF folder by adding the following code.

Code Block
languagehtml/xml
titlejboss-deployment-structure.xml
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclude-subsystems>
            <subsystem name="weld" />
        </exclude-subsystems>
    </deployment>
</jboss-deployment-structure>

Bouncy Castle

Magnolia uses the Bouncy Castle cryptography package to decode the license key and to secure the activation process. WildFly ships with a slightly older version of these libraries.

  1. Find the BC module folder in $WILDFLY_HOME/modules/system/layers/base/org/bouncycastle/main.
      (warning) JBoss EAP $EAP_HOME/modules/system/layers/base/org/bouncycastle/main

  2. Remove all the existing jar files.
  3. Place the required Bouncy Castle JAR files in the folder:
    • Provider bcprov
    • PKIX bcpkix

    • OpenPGP/BCPG bcpg
    • SMIME bcmail
  4. Edit the module.xml file in the same folder.

    Code Block
    languagehtml/xml
    titlemodule.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.1" name="org.bouncycastle">
      <resources>
        <resource-root path="bcprov-jdk15on-1.58.jar"/>
        <resource-root path="bcpkix-jdk15on-1.58.jar"/>
        <resource-root path="bcpg-jdk15on-1.58.jar"/>
        <resource-root path="bcmail-jdk15on-1.58.jar"/>
      </resources>
      <dependencies>
        <module name="javax.api" slot="main" export="true"/>
      </dependencies>
    </module>
  5. Create or edit jboss-deployment-structure.xml file in Magnolia's WEB-INF folder by adding the following code.

    Code Block
    languagehtml/xml
    titlejboss-deployment-structure.xml
    <?xml version="1.0"?>
    <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
        <deployment>
            <dependencies>
              <module name="org.bouncycastle" slot="main" export="true" />
            </dependencies>
        </deployment>
    </jboss-deployment-structure>

Configuring Log4j

WildFly Application Server adds its own log4j logging configuration. If you want to use your own log4j logging configuration (or the one provided by Magnolia) in your deployment, exclude the default configuration first.

...

Code Block
languagehtml/xml
titlejboss-deployment-structure.xml
<jboss-deployment-structure>
  <deployment>
    <exclusions>
      <module name="org.apache.log4j" />
      <module name="org.slf4j" />
    </exclusions>
  </deployment>
</jboss-deployment-structure>

Resteasy class loading issue

During a deployment the Resteasy libraries can cause a class loading issue when the RestClient module is used. You can get rid of the issue by excluding the following subsystems in the <deploymenŧ> element of the jboss-deployment-structure.xml file:

Code Block
titlejboss-deployment-structure.xml
<exclude-subsystems>
 <subsystem name="jaxrs" />
 <subsystem name="resteasy" />
</exclude-subsystems>

Deployment options

Deploying a WAR

To deploy the downloaded Magnolia WAR file to WildFly:

...

Info

(warning) WildFly unpacks .war files to a tmp directory and deletes the directory as part of the shutdown process. This means that every time WildFly restarts, the Magnolia webapp forgets everything – modules, repository, license key. To get around this issue, you can deploy the Magnolia webapp as an extracted (unpacked) directory or configure Magnolia to store the repository outside the tmp directory. Alternatively, specify the following paths in your  magnolia.properties configuration. If you point the paths outside of WildFly's tmp directory, Magnolia will not reinstall on every startup and they will not be deleted on every shutdown.

Code Block
magnolia.home=/somewhere_outside_of_wildfly_tmp_folder
magnolia.cache.startdir=${magnolia.home}/cache
magnolia.upload.tmpdir=${magnolia.home}/tmp
magnolia.exchange.history=${magnolia.home}/history
magnolia.repositories.home=${magnolia.home}/repositories
magnolia.logs.dir=${magnolia.home}/logs

Deploying extracted directories

To deploy an extracted directory:

...