r2 - 07 Jul 2008 - 11:52:47 - RandyLetnessYou are here: OSAF >  Documentation Web  >  ServerBundleAdministrator > ServerBundleInstallation > CosmoGlassFish
Cosmo web server

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.

  1. Download and unpack osaf-server-bundle-x.y.z
  2. Create a database (see CosmoDatabaseSetup).
  3. create jdbc pool/connection using glassfish admin ui: screen1 | screen2 | screen3
  4. Add the following system props using the admin ui: screen
  5. configure the Mail resource using the admin ui: screen
  6. 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
  7. Unzip chandler.war to temporary dir chandler.war
  8. Remove chandler.war/META-INF
  9. copy cosmo.properties into chandler.war/WEB-INF/classes and modify for you config
  10. 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

  1. 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>

  1. deploy chandler.war dir using GLASSFISH_HOME=/bin/asadmin.bat deploydir c:\temp\chandler.war

-- RandyLetness - 30 Jun 2008

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
jpgjpg glassfishjdbc1.jpg manage 74.6 K 30 Jun 2008 - 06:41 RandyLetness jdbc config 1
jpgjpg glassfishjdbc2.jpg manage 140.5 K 30 Jun 2008 - 06:42 RandyLetness glassfish jdbc 2
jpgjpg glassfishjdbc3.jpg manage 74.3 K 30 Jun 2008 - 06:42 RandyLetness glassfish jdbc 3
jpgjpg glassfishmail.jpg manage 130.4 K 30 Jun 2008 - 06:42 RandyLetness glassfish mail config
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.