Lab #2 (Seam Command Line Interface Basics)
Overview
Seam has introduced a powerful command line interface, called seam-gen that
can be used to quickly develop Seam applications. Basically, you type simple
commands that generate the code and project packaging needed to make good things
happen. In this lab, we will create a simple Seam "helloworld-lab2" project
from scratch and execute the following commands:
- seam setup
- Gathers key project info, including datasource settings, Java package
naming conventions and more.
- seam new-project
- Creates a new project with a fully functional ant build script for compilation/deployment.
- seam explode
- Copies a Seam EAR or any EAR changes as an exploded archive to the server
deployment directory.
- seam unexplode
- Deletes an exploded Seam EAR from the server deployment directory
- seam deploy
- Copies a Seam EAR archive (non-exploded) to the server deployment directory.
- seam undeploy
- Deletes a Seam EAR archive (non-exploded from the server deployment
directory.
Lab Instructions
- Create a helloworld project (Keep in mind that [enter]
means you don't need to enter any text. Seam-gen has good defaults for many
project setup input items)
- type: cd @seamHome@
- type: seam setup (This will take you through a list of text
input screens)
- Java Workspace: [enter]
- JBoss Home: [enter]
- Project Name: helloworld-lab2
- Java Package Name for Session Beans: [enter]
- Java Package Name for Entity Beans: [enter]
- Java Package Name for Message Driven Beans: [enter]
- Java Package Name for Test Cases: [enter]
- What database are you using: [enter]
- Enter the Hibernate Dialect: [enter]
- Enter the fileysystem for the jdbc driver: [enter]
- Enter JDBC URL: [enter]
- Enter database username: [enter]
- Enter database password: [enter]
- Are you working with tables that already exist: [enter]
- type: seam new-project
- Deploy helloworld to JBoss Application Server
- EXTRA CREDIT: Edit/Re-deploy/Un-deploy helloworld to JBoss Application Server
- CHEAT: cd @seamHome@
- type: seam labs-cheat (Enter '2' for the lab cheat you want to apply)
- NO CHEAT: Edit the helloworld home page
- Located at: @workspaceHome@@sep@helloworld-lab2@sep@view@sep@home.xhtml
- type: seam explode
- Goto URL: http://localhost:8080/helloworld-lab2
(Page should be different)
- type: seam unexplode (Will undeploy the exploded EAR file)
Key Files
@workspaceHome@@sep@helloworld-lab2@sep@view@sep@home.xhtml
Home | Next