r1 - 07 Jul 2008 - 11:30:36 - RandyLetnessYou are here: OSAF >  Documentation Web  >  ServerBundleAdministrator > ServerBundleInstallation > CosmoWeblogicTen
Cosmo web server

Deploying Cosmo in Weblogic 10



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 Weblogic 10. It assumes familiarity with configuring Weblogic and deploying web applications into the server. Getting cosmo to run in Weblogic 10 was a chore and involves deploying the application as an ear (enterprise archive) vs a war (web application archive). Also, there are still a couple unresolved problems, one of which is accessing the login page without an explicit /login/. Please share any experiences so we can keep these docs up to date.

Installation instructions

These instructions are for Windows systems, but the modifications for Unix like systems should be obvious. Filesystem paths within the Weblogic installation are prefixed with $WL_HOME.

  1. Download and unpack osaf-server-bundle-x.y.z
  2. Create a database (see CosmoDatabaseSetup).
  3. Create jdbc resource using weblogic admin (example here uses jndi name of jdbcCosmo)
  4. Create/configure mail resource using weblogic admain (example here uses jndi name of mail/cosmo)
  5. Create top-level directory for exploded ear, chandler (can be created anywhere on filesystem)
  6. Create chandler/META-INF/application.xml
<?xml version="1.0" encoding="UTF-8"?> 
<application>
 <display-name>CosmoEAR</display-name>

 <module>
     <web>
         <web-uri>chandler.war</web-uri>
         <context-root>chandler</context-root>
     </web>
  </module>

</application>

  1. Create chandler/META-INF/weblogic-application.xml
<weblogic-application>

<prefer-application-packages>
<package-name>org.apache.xerces.*</package-name>
</prefer-application-packages>

</weblogic-application>

  1. Unzip chandler.war to chandler/chandler.war
  2. Create chandler/chandler.war/WEB-INF/weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 
                    http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">

   <container-descriptor>
      <prefer-web-inf-classes>true</prefer-web-inf-classes>
   </container-descriptor>
    
   <resource-description>
      <res-ref-name>mail/cosmo</res-ref-name>
      <jndi-name>mail/cosmo</jndi-name>
    </resource-description>
    <resource-description>
      <res-ref-name>jdbc/cosmo</res-ref-name>
      <jndi-name>jdbcCosmo</jndi-name>
    </resource-description>
</weblogic-web-app>

  1. Create chandler/chandler.war/WEB-INF/classes/log4j.properties for example:
log4j.rootLogger=WARN, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=C:/bea/user_projects/domains/base_domain/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

log4j.logger.org.osaf.cosmo=DEBUG

  1. Copy the following jars from osaf-server-bundle-x.y.z/common/lib to chandler/chandler.war/WEB-INF/lib
    • log4j.jar
    • commons-logging.jar
  2. Copy osaf-server-bundle-x.y.z/etc/cosmo.properties to chandler/chandler.war/WEB-INF/classes and modify for your config
  3. Modify $WL_HOME/user_projects/domains/[domain_name]/config/config.xml and add the following element to the =security-configuration:
<security-configuration>
...
<enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials>
...
</security-configuration>

  1. deploy ear dir chandler

-- RandyLetness - 07 Jul 2008

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: 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.