Deploying Cosmo in Glassfish
See
CosmoServletContainerRequirements for the general set of expectations the Cosmo webapp has for a servlet container. This document describes how to meet those expectations with
GlassFish? V2 Update Release 2 (UR2). It assumes familiarity with configuring Glassfish and deploying web applications into the server.
Installation instructions
These instructions are for Windows systems, but the modifications for Unix like systems should be obvious. Filesystem paths within the Glassfish installation are prefixed with
$GLASSFISH_HOME. Relative filesystem paths refer to the base directory of the unpacked Cosmo webapp tarball.
- Download and unpack
osaf-server-bundle-x.y.z
- Create a database (see CosmoDatabaseSetup).
- create jdbc pool/connection using glassfish admin ui: screen1 | screen2 | screen3
- Add the following system props using the admin ui: screen
- configure the Mail resource using the admin ui: screen
- Copy the following jars from
osaf-server-bundle-x.y.z/common/lib to =$GLASSFISH_HOME/domain1/lib/ext
- commons-logging
- log4j
- postgres/mysql jdbc driver
- Unzip chandler.war to temporary dir
chandler.war
- Remove
chandler.war/META-INF
- copy cosmo.properties into
chandler.war/WEB-INF/classes and modify for you config
- create log4j.properties in domain1/lib/classes
log4j.rootLogger=WARN, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=c:/temp/glassfish/domains/domain1/logs/cosmo.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=WARN, R
log4j.logger.org.apache.catalina.core=WARN, R
log4j.logger.org.apache.catalina.session=WARN, R
- create
sun-web.xml in chandler.war/WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD
Application Server 9.0 Servlet 2.5//EN'
'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>
<sun-web-app>
<resource-ref>
<res-ref-name>jdbc/cosmo</res-ref-name>
<jndi-name>jdbc/cosmo</jndi-name>
</resource-ref>
<resource-ref>
<res-ref-name>mail/cosmo</res-ref-name>
<jndi-name>mail/cosmo</jndi-name>
</resource-ref>
</sun-web-app>
- deploy
chandler.war dir using GLASSFISH_HOME=/bin/asadmin.bat deploydir c:\temp\chandler.war
--
RandyLetness - 30 Jun 2008