Seam On Resin Deployment
From Resin 4.0 Wiki
(Difference between revisions)
(Created page with "{{Integration}} ==Focus on: deploying seam-booking example application in Resin server== == Software Prerequisites == ----- *Resin (Pro) 4.0.29 or later (http://www.caucho.c...") |
|||
Line 1: | Line 1: | ||
− | {{Integration}} | + | {{Cookbook}} {{Integration}} {{WebServer}} |
==Focus on: deploying seam-booking example application in Resin server== | ==Focus on: deploying seam-booking example application in Resin server== |
Latest revision as of 00:00, 26 June 2012
Contents |
[edit] Focus on: deploying seam-booking example application in Resin server
[edit] Software Prerequisites
- Resin (Pro) 4.0.29 or later (http://www.caucho.com/download)
- Seam 3.1.0 Final ( located at http://www.seamframework.org )
[edit] 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)
[edit] 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>
[edit] 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>
[edit] 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