Seam On Resin Deployment

From Resin 4.0 Wiki

Jump to: navigation, search

spacer spacer spacer

Contents

  • 1 Focus on: deploying seam-booking example application in Resin server
  • 2 Software Prerequisites
  • 3 Preparing seam-booking
  • 4 WEB-INF/classes/META-INF/persistence.xml
  • 5 WEB-INF/resin-web.xml
  • 6 List of jar files that need to be copied into webapp-jars

Focus on: deploying seam-booking example application in Resin server

Software Prerequisites


  • Resin (Pro) 4.0.29 or later (www.caucho.com/download)
  • Seam 3.1.0 Final ( located at www.seamframework.org )

Preparing seam-booking

  • Unzip seam-3.1.0.Fiinal.jar
  • Change into seam-3.1.0.Final/examples/seam-booking directory
  • Issue mvn install command
  • Copy expanded seam-booking directory into Resin's webapps directory
  • Edit WEB-INF/classes/META-INF/persistence.xml (see below)
  • Add "WEB-INF/resin-web.xml to add a datasource (see below)
  • Copy the required libraries into webapp-jars directory (see list of libraries below)

WEB-INF/classes/META-INF/persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="java.sun.com/xml/ns/persistence"
                     xmlns:xsi="www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="java.sun.com/xml/ns/persistence java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
                     version="2.0">
   <persistence-unit name="booking">
       <jta-data-source>java:comp/env/jdbc/booking</jta-data-source>
       <properties>
           <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
           <property name="eclipselink.ddl-generation.output-mode" value="database"/>
       </properties>
   </persistence-unit>
</persistence>

WEB-INF/resin-web.xml

<web-app xmlns="caucho.com/ns/resin">
  <database>
    <jndi-name>jdbc/booking</jndi-name>
    <driver type="org.hsqldb.jdbc.JDBCDriver">
      <url>jdbc:hsqldb:file:/tmp/seambooking</url>
      <user>SA</user>
      <password></password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>8</max-connections>
    <max-idle-time>30s</max-idle-time>
    <spy/>
  </database>
</web-app>


List of jar files that need to be copied into webapp-jars

  • change into seam-3.1.0.Final/lib
  • copy the following files into Resin's webapp-jars directory
drools-api.jar
drools-compiler.jar
drools-core.jar
hibernate-core-4.0.0.Final.jar
hibernate-validator-4.2.0.Final.jar
hsql.jar
javassist.jar
jtds.jar
portal-service.jar
portlet.jar
saxpath.jar
Retrieved from "wiki4.caucho.com/index.php?title=Seam_On_Resin_Deployment&oldid=676"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in
Navigation
  • Main page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
TOOLBOX
LANGUAGES
Toolbox
  • What links here
  • Related changes
  • Special pages
  • Printable version
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.