This page last changed on Nov 01, 2007 by rosie@atlassian.com.

The Bamboo start up script can be customised to setup JNDI resources
Find the following section in your Bamboo.sh script. (This section specifies how the Bamboo server will start)

#
# 	This is how the Bamboo server will be started
#
RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true -Djetty.port=8085 com.atlassian.bamboo.server.Server 8085 ./webapp /"

Now, modify this startup script to read the jetty.xml file from webapp/WEB-INF/classes/jetty.xml, which can be used to specify JNDI resources. Modify the RUN_CMD argument as below

RUN_CMD="java -Xms256m -Xmx512m -Djava.awt.headless=true -classpath $CLASSPATH -Dorg.mortbay.xml.XmlParser.NotValidating=true webapp/WEB-INF/classes/jetty.xml

You will also need to change the jetty.xml file under webapp/WEB-INF/classes by change the context path from /bamboo to /. Example of this is below:

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Add root context web applications. -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Call name="addWebApplication">
    <Arg>/</Arg>
    <Arg>
       <SystemProperty name="bamboo.webapp" default="webapp"/>
    </Arg>
</Call>

To set up the JNDI mail session, you will also need to uncomment and modify the section of this jetty.xml which looks like this:



<!--
    <Call name="addService">
        <Arg>
            ...
        </Arg>
    </Call>
-->

You will need to replace the values inside the <Arg> tags with appropriate values (username, password, host, from address).

Document generated by Confluence on Apr 14, 2008 01:39