ChannelDB2

Running Grails 1.3 applications on Websphere CE/Geronimo 2.1

If you want to run Grails applications on Websphere Community Edition (Apache Geronimo) you will face few challenges.

  1. Grails applications needs more memory than default provided by Java. You need to set JAVA_OPTS variable or alter default values.

    In windows alter file bin\setjavaenv.bat add line:

    if "%JAVA_OPTS%" == "" set JAVA_OPTS=-Xmx512m -XX:MaxPermSize=128m
    In Unix alter file bin/setjavaenv.sh
    if [ -z "$JAVA_OPTS" ]; then          JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m"
    fi

    I dont want to go too deep into details but if you are starting WAS CE with other command then startup.sh you might need to modify other file.

  2. You need to deployement descriptor into your application. For WAS CE it is named geronimo-web.xml and it is placed in web-app/WEB-INF directory in your grails project. Example content is following:
     <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1
    http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
    <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2"
    xsi:schemaLocation="http://geronimo.apache.org/xml/ns/deployment-1.2
    http://geronimo.apache.org/xml/ns/deployment-1.2">
    <moduleId>
    <groupId>zzzz</groupId>
    <artifactId>web</artifactId>
    <version>1.0</version>
    <type>war</type>
    </moduleId>
    <non-overridable-classes>
    <filter>net.sf.cglib</filter>
    </non-overridable-classes>
    <inverse-classloading/>
    </environment>
    <context-root>/app1</context-root>
    </web-app>

Views: 212

Comment

You need to be a member of ChannelDB2 to add comments!

Join ChannelDB2

Try BLU Acceleration on Cloud

© 2014   Created by channeldb2.

Badges  |  Report an Issue  |  Terms of Service