`
zjt112g
  • 浏览: 25589 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
最近访客 更多访客>>
社区版块
存档分类
最新评论

运行seam 的example下面的例子.

    博客分类:
  • seam
阅读更多
需要软件:
ant1.7
jboss-4.2.3.GA
jdk5.0 
jboss seam:jboss-seam-2.0.3.CR1

在运行实例的过程中,无非是完成 项目的部署以及 数据库的生成

1:在E:\jboss-seam-2.0.3.CR1 (seam 解压后的路径) 下面找build.properties ,在最末一行添加一行:jboss.home=E:\\jboss-4.2.3.GA ,注意在windows下面是\\

2:启动jboss

3:部署booking这个例子,首先用cmd进入E:\jboss-seam-2.0.3.CR1\examples\booking  这个路径下面,直接ant deploy 结束后console会有提示,然后去jboss 的E:\jboss-4.2.3.GA\server\default\deploy 目录下面看看是否已经部署成功,如果部署成功,会有jboss-seam-booking.ear,jboss-seam-booking-ds.xml 这2个文件生成

4:修改jboss-seam-booking-ds.xml


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE datasources
    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">

<datasources>
    <local-tx-datasource>
        <jndi-name>bookingDatasource</jndi-name>
        <connection-url>jdbc:hsqldb:yourdb</connection-url>
        <driver-class>org.hsqldb.jdbcDriver</driver-class>
        <user-name>sa</user-name>
        <password></password>
    </local-tx-datasource>
</datasources>

修改完后你可以去你的hsqldb下面去找生成的数据,jboss自己带一个tool 可以查看数据,这个tool是个awt程序,在jboss console 里面--》

jboss
database=localDB,service=Hypersonic
--》

void startDatabaseManager()
MBean Operation.



点击invoke就可以启动这个tool, file --》connect -->URL 更改为jdbc:hsqldb:yourdb 就可以查看到delopoy后自动建的表,以及初始化数据!


运行http://localhost:8080/seam-booking/
就可以跑这个example了

最后总结一下,如果把seam所有的example搞清楚,你就基本搞清楚seam 的几乎所有内容,因为example牵扯了几乎所有seam的feature:


这是seam example 里面的内容


blog/                 The Seam blog example, showing how to write
                      RESTful applications using Seam

booking/              The Seam Booking demo application for EJB 3.0

contactlist/          The Seam Contact List demo demonstrating use
                      of the Seam application framework
                     
drools/               A version of the number guessing example that
                      uses Drools with jBPM

dvdstore/             The Seam DVD Store demo demonstrating jBPM
                      support in Seam
                     
groovybooking/        The Seam Booking demo ported to Groovy

hibernate/            The Seam Booking demo ported to Hibernate3

icefaces/             The Seam Booking demo with ICEfaces, instead of
                      Ajax4JSF

itext/                A demo of the Seam iText integration for generating pdfs
                     
jee5/booking          The Seam Booking demo ported to the Java EE 5
                      platforms
                     
jee5/remoting         The Seam remoting helloworld demo ported to the Java EE 5
                      platforms                     

jpa/                  An example of the use of JPA (provided by Hibernate), runs
                      on many platforms, including non-EE 5 platforms (including
                      plain Tomcat)
                     
mail/                 The Seam mail example demonstrating use of
                      facelets-based email templating

messages/             The Seam message list example demonstrating use
                      of the @DataModel annotation
                     
nestedbooking/        The booking example modified to show the use of nested
                      conversations                     

numberguess/          The Seam number guessing example, demonstrating
                      jBPM pageflow

quartz/               A port of the Seampay example to use the Quartz dispatcher

registration/         A trivial example for the tutorial               

remoting/chatroom/    The Seam Chat Room example, demostrating Seam
                      Remoting

remoting/gwt/         An example of using GWT with Seam remoting

remoting/helloworld/  A trivial example using Ajax
                     
remoting/progressbar/ An example of an Ajax progress bar

seambay/              An example of using Seam with Web Services

seamdiscs/            Demonstrates Seam, Trinidad, Ajax4jsf and Richfaces

seampay/              The Seam Payments demo demonstrating the use of
                      asynchronous methods
               
seamspace/            The Seam Spaces demo demonstrating Seam
                      Security

spring/               Demonstrates Spring framework integration

todo/                 The Seam todo list example demonstrating
                      jBPM business process management
                     
ui/                   Demonstrates some Seam JSF controls

wiki/                 A fully featured wiki system based on Seam, please
                      read wiki/README.txt for installation instructions

推荐几本seam 的好书:
seam_reference2.03.pdf 这是seam自带的一个文档,我认为是个很好的文档,redsaga里面有国内的jboss的爱好者翻译的文档,是Seam_2.0_Reference_zh_CN.pdf
Seam_2.0_Reference_zh_CN.pdf

Beginning JBoss Seam
JBossIDE-Tutorial
richfaces_reference
seam in action
《JSF入门》简体中文版
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics