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:
Generate different color versions from one single web template with GIMP
Suppose you have developed a beautiful web template in some vectorial program, now you have to cut it in several partial images to make the html/css/image web template. But some times it is difficult to change the colors in a consistent manner and the cut it again color by color to obtain many color variants. Here is a script that can help you to do it in one step.
Example output:
- Copy the file tplcolor.scm into your /usr/share/gimp/2.0/scripts/ directory.
- Run the script in GIMP batch mode from the command line:
- gimp -i -b “(batch-colorize-jpg \”*.jpg\” $i $j $k)” “(batch-colorize-indexed \”*.gif\” $i $j $k)” “(batch-colorize \”*.png\” $i $j $k)” ‘(gimp-quit 0)’
- Or use the bash scrip: gentempl.sh in the same directory of the original template images.
tplcolor.scm script is based on http://www.gimp.org/tutorials/Basic_Batch/
Download the scripts: tplcolor.zip
Linux kernel (2.6.22) vs MS Windows Vista Kernel
There is a complete and useful comparison between those kernels:
See the article: http://widefox.pbwiki.com/Kernel%20Comparison%20Linux%20vs%20Windows
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.


