Dashboard > Community Wiki > ... > Deployment > Install Magnolia 2.1 on JBoss4
Install Magnolia 2.1 on JBoss4 Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Jun 22, 2008  (view change)
Labels: 

There are a bunch of pages related to JBoss deployment. If someone wants to volunteer and merge them, that'd be much appreciated.

Deploying on JBoss (Community Wiki)
Labels: v2_0, jboss, installation, config, v2_1, deployment, app-server
How to install Magnolia 3.0 EE on Jboss 4.0.x (Community Wiki)
Labels: jboss, deployment
How to secure the JBoss server (Community Wiki)
Labels: jboss, deployment
Install Magnolia 2.1 on JBoss4 (Community Wiki)
Labels: jboss, installation, deployment, v2_1
Installation on JBoss4 (Community Wiki)
Labels: jboss, app-server, deployment
Installation under JBoss (Community Wiki)
Labels: jboss, deployment, app-server
Magnolia JBoss and JAAS (Community Wiki)
Labels: jboss, deployment
Magnolia, Eclipse, Jboss and Oracle (Community Wiki)
Labels: jboss, oracle, eclipse

Installation of either Author or Public on JBoss 4

---------------------------------------------------

I completed the installation of either Author or Public web site on JBoss 4.0.x under Windows 2000. So far I have not tested the installation beyond the point of making it work. As soon as I have more experience I will update this page.

  • JBOSS_SERVER
    the directory where your JBoss server environment is. By default JBoss comes with these server environments: minimal, default and all and by default it uses the environment default
  • MAGNOLIA_HOME
    the directory of the extract Magnolia web application within the JBOSS_SERVER/deploy directory

These are the steps necessary to install Magnolia:

  1. Take the magnoliaAuthor.war or magnoliaPublic.war and extract it into JBOSS_SERVER/deploy directory
  2. Attention: make sure that directory has the extension .war otherwise JBoss goes havoc
  3. Start JBoss
  4. Open a browsers and enter the url to magnolia: http://<server name>:<web port>/<name of the magnolia directory without extension or the document root> (example: _http://localhost:8080/magnoliaAuthor_)

Now everything should work but when you think about running a production side this is not good enough because the repository remains within the application and so you could lose the data during a reinstallation or corrupt it through a redployment. So what I did was to move the repository outside of the application into my data directory, opening the MAGNOLIA_HOME/WEB-INF/config/default/repositories.xml file and changing all repositoryHome attributes pointing to the new repository location:

...
<Repositories>
   <!-- magnolia default website repository -->
   <Repository name="website" id="website" provider="info.magnolia.jackrabbit.ProviderImpl"
         loadOnStartup="true">
      <param name="configFile" value="WEB-INF/config/repo-conf/jackrabbit-file-search.xml" />
<!-- Adjust the following attribute pointing to the new repository location -->
      <param name="repositoryHome" value="/data/magnolia/repositories/website" />
      <param name="contextFactoryClass" 
         value="org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory" />
      <param name="providerURL" value="localhost" />
      <param name="bindName" value="websiteAuthor" />
   </Repository>
...

ATTENTION: If you decide to keep the repository inside the Magnolia web application then remember that you should not deploy the WAR file without having it extracted first. Because what is going to happen is that JBoss extracts the repository into a temporary directory. So far that is not bad but as soon as you redeploy the application (I am not sure about a restart) the WAR file is extract into another directory causing you to loose all the data in the repository. If you keep the repository outside of the application server you can deploy Magnolia as a WAR file.

In case you also want to keep the /cache and /tmp outside of the application you can adjust the MAGNOLIA_HOME/WEB-INF/web.xml file.

In case you want to change the document root then please create a jboss-web.xml file in MAGNOLIA_HOME/WEB-INF directory and add something like this:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web> 
    <context-root>/magnolia/author</context-root>
</jboss-web>

Have fun - Andy

In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:25:04 AM by PatrickBalm

Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators