Asimov Technologies
J2EE, JEE, PHP
Frank D. Martínez’s Blog
Software & Fun
Welcome to my technical blog. Here you can find my opinions and proposals over many software development things, mainly on open source projects.
Example: Seam 2.0 + Wicket 1.3 + Netbeans 6.0 + Glassfish V2
One of the more exciting features of JBoss Seam 2.0 is that it is decoupled of JSF. Here is a sample project using Seam 2.0 with Apache Wicket instead of JSF. And additionally it is a Netbeans 6.0 project and is configured to deploy into Glassfish V2.
Project architecture image (click it to enlarge) :
Project Tree image (click it to enlarge) :
Explanation of the numerated marks in the images above:
1. static html, css, javascript, images, and so forth
2. Seam configuration files:
- components.xml see: reference
- pages.xml see: reference
3. JPA based data model (Annotated persistent pojos)
4. EJB 3.0 Layer. Business logic goes here. Access to the EntityManager, Other EJBs, JNDI Resources, Web Services, etc …
5. Wicket pages. All Wicket java code goes here.
- To get seam support in a wicket page it must be a subclass of SeamWebPage.
- To get seam support in your application it must be a subclass of SeamWebApplication.
6. Wicket html code goes here. The package tree must be consistent with (5)
7. JUnit tests packages…
8. Ant build script
- clean : Clear all compiled classes, jars, ears, etc…
- ear : Generate the deployable ear.
- deploy : Deploy the ear to the glassfish v2 autodeploy dir.
- undeploy : Removes the ear from the glassfish v2 autodeploy dir.
Download: Project with all dependencies
Instructions:
1. Install Netbeans 6.0 with JEE support: http://www.netbeans.org/
2. Download de example project: download
3. Unzip it where you want.
4. Edit the private.properties file in the project root and set the glassfish.home property to your Glassfish installation dir.
5. Open the project with Netbeans
6. Start Glassfish
7. Right click on the build.xml - execute task - deploy
8. Point your browser to http://localhost:8080/wicket-seam/
You can get more specific documentation from Apache and RedHat sites:
- Apache Wicket home page: http://wicket.apache.org/
- JBoss Seam home page: http://labs.jboss.org/jbossseam/
Wicket-Seam Integration
There is the first version of Wicket-Seam integration module.
- Download it form the svn repository: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/
- Build it from source: with maven 2: mvn -Dmaven.test.skip=true package
- Or download the binary: wicket-seam-1.3.0-SNAPSHOT.jar
There is a basic example here: wicket-seam-project It is a netbeans 6.0 project configured to deploy to Glassfish V2. This example contains all required dependencies. IMPORTANT: Before use it you must set the glassfish.home property in the private.properties file.
The general architecture of the example project is this:
RESTful + GWT Application
I’m working on a small web application project for a brick factory … It is a personal project and i will use the Jersey project for the server side RESTful code and GWT for the RIA Client. I Think there is a perfect fit for these projects in this case. I will evaluate the OpenLaszlo platform too, but I think I will use GWT anyway.
This site contains personal opinions about many things and does not intend to be normative in any aspect.
Java, J2EE, J2SE, JEE, Are trademarks of Sun Microsystems Inc.