JBoss 4.0

Step 1 - .war or extracted archive deployment

  • Copy the Magnolia .war file into the JBOSS_HOME/server/default/deploy folder.
  • If you are deploying an extracted .war you must rename the webapp folder by adding the ".war" extension.

Step 2 - Configure Magnolia JAAS login modules

  • Open JBOSS_HOME/server/default/conf/login-config.xml.
  • Add the following login modules in login-config.xml under <policy>; the sequence of the login modules configured in this file does not matter.
<!-- Magnolia JAAS login modules -->
     <application-policy name="magnolia">
        <authentication>
           <login-module code="info.magnolia.jaas.sp.jcr.JCRAuthenticationModule" flag="requisite" />
           <login-module code="info.magnolia.jaas.sp.jcr.JCRAuthorizationModule" flag="required" />
        </authentication>
     </application-policy>

<!-- Jackrabbit JAAS login modules --> <application-policy name="Jackrabbit"> <authentication> <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag="required" /> </authentication> </application-policy>

Step 3 - Assign Heap Memory

  • Set JAVA_OPTS in JBOSS_HOME/bin/run.conf
  • Configure this under the section "//# Specify options to pass to the Java VM.// " (eg. JAVA_OPTS="-server -Xms1024m -Xmx1024m -Dsun.rmi...)

Step 4 - Restart JBoss and access Magnolia

Step 5 (optional) - Change context path

  • Stop JBoss.
  • Add a jboss-web.xml file in the WEB-INF folder of your Magnolia instance.
  • The file should contain the following:
<jboss-web>
   <context-root>/YourContextPath</context-root>
</jboss-web>
...where YourContextPath is your actual context path. (which can be /, for a public instance, for example)
  • Restart JBoss: your webapp should be available at e.g. http://localhost:8080/YourContextPath
  • Note: without this file placed under your WEB-INF folder, the context path will be the web application's folder name, by default.