I did some investigation about the JBoss seam a few days ago because of the project requirement. JBoss seam is a new web framework in combination with JSF,EJB3 and Ajax4Jsf etc.

With a bunch of the exciting technologies, I think JBoss seam has a very good prospect. But like any other new frameworks and technologies, there are lots of problems and even some potential rules for that if you want to create your own project with that.

After the painful experience, I write down the steps to try JBoss seam. You can follow the below steps to try it.

JDK and Tools

JDK : need Sun JDK 1.5 or later

Ant : need Apache Ant 1.6.5 or later

You should add JAVA_HOME and ANT_HOME to the system variables, and add the ant java bin home to the system path.

Download and install JBOSS Seam

You can download the latest production release of JBoss seam from http://labs.jboss.com/jbossseam/download/index.html

The current product release is 1.2.1GA.

Unpack the zip or tar.gz file to your local disk.

Install JBoss AS

You’d better use the community version of the JBoss AS because the EAP version is a little special for using JBoss seam of community version.

In the tutorial we use the Jboss AS 4.0.5 GA with EJB3 module because it can run stably with JBoss seam 1.2.1 GA.

To install the suitable JBoss AS 4.0.5 GA, you must download the JEMS installer to install EJB 3 module for the seam use.

http://labs.jboss.com/jbossas/downloads

Using MySQL as the backend database

After download and install MySQL database from the MySQL web site, you can create user and password as seam for our test. In addition to, you should create a table user as following:

create table osmsuser(id int(10) primary key auto_increment,

name varchar(10) not null,

password varchar(10) not null,

gender varchar(2) not null,

dob date not null);

Besides above, the MySQL connector/J is necessary for seam connecting to the MySQL database. Download and rename MySQL connecter/J jar packages to mysql5.jar, then copy to the jboss-seam-1.2.1.GA"seam-gen"lib".

You can go to here find more details:http://dev.mysql.com/downloads/.

Configuring JBoss seam-gen

The configuration of seam is pretty simple! you just need specify the jboss.home at the build.properties file located at jboss-seam-1.2.1.GA". Edit the file and add the JBoss AS home directory and save that.

Create your first project

In Dos(windows) or shell(Linux/unix) prompter, enter the seam-gen directory located at jboss-seam-1.2.1.GA"seam-gen

And executing the following command:

a. setup a project

# ./seam setup

b.create a project

# ./seam new-project

c. import your project to the Eclipse IDE

d. add entities to your project

# ./seam generate-entities

e. recompile and deploy the project

#./seam restart

f. start JBoss AS and browser http://127.0.0.1:8080/myseam1.2



柴油发电机
发电机
柴油机
柴油发电机
13636374743(上海)
13291526067(嘉兴)