Caucho maker of Resin Server | Application Server (Java EE Certified) and Web Server


 

Resin Documentation

home company blog wiki docs 
app server 
 Resin Server | Application Server (Java EE Certified) and Web Server
 

seam


Seam on Resin

Steps required to run the seam-booking example. Software Prerequisites:

  • Resin 4.0.29+
  • Seam 3.1.0+

Prepare seam-booking example

  • Unzip seam-3.1.0.Final.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="http://java.sun.com/xml/ns/persistence"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://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="http://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>

Copy seam-3.1.0-Final/lib jar files to 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

Copyright © 1998-2012 Caucho Technology, Inc. All rights reserved. Resin ® is a registered trademark. Quercustm, and Hessiantm are trademarks of Caucho Technology.

Cloud-optimized Resin Server is a Java EE certified Java Application Server, and Web Server, and Distributed Cache Server (Memcached).
Leading companies worldwide with demand for reliability and high performance web applications including SalesForce.com, CNET, DZone and many more are powered by Resin.

home company blog wiki docs 
app server